1.0.0 • Published 7 years ago
sweet-time-ago v1.0.0
安装:
npm install sweet-time-ago --save
使用:
import timeAgo from 'sweet-time-ago'
timeAgo(Date.now()) //刚刚
timeAgo(1498924800000) //4周前
timeAgo('2017-07-24') //2天前
timeAgo('2017/07/25') //昨天
timeAgo('2017.7.25') //昨天
timeAgo('2017 07 25') //昨天
timeAgo('2017年7月25日') //昨天
1.0.0
7 years ago