JSPM

timeagojs

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q41447F
  • License ISC

* hahahaha ## 用法 * import setTimeago from 'timeago' * setTimeago.init(timestamp) ## 规则 * 一分钟之内:“刚刚” * 一小时内:“XX分钟以前” * 半小时:“半小时前” * 当天超过一小时:“xx小时前” * 前一天:“昨天xx:xx” * 前两天:“前天xx:xx” * 当年超过两天:“xx月xx日” * 其他:“xx年xx月xx日”

Package Exports

  • timeagojs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (timeagojs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

timeago

安装

  • hahahaha

用法

  • import setTimeago from 'timeago'
  • setTimeago.init(timestamp)

规则

  • 一分钟之内:“刚刚”
  • 一小时内:“XX分钟以前”
  • 半小时:“半小时前”
  • 当天超过一小时:“xx小时前”
  • 前一天:“昨天xx:xx”
  • 前两天:“前天xx:xx”
  • 当年超过两天:“xx月xx日”
  • 其他:“xx年xx月xx日”