hustcc / timeago.js

:clock8: :hourglass: timeago.js is a tiny(2.0 kb) library used to format date with `*** time ago` statement.
https://timeago.org
MIT License
5.32k stars 410 forks source link

:writing_hand: v4.0.0, sorry for late! #200

Closed hustcc closed 5 years ago

hustcc commented 5 years ago

1 year ago, open the v4.0.0 issue, sorry for late.


4.0.0 will contains below:

Those can be got on beta version v4.0.0-beta.3.

API

import { format, render, cancel, register } from 'timeago.js';

The 3rd parameter of format, render will be opts. Detail in readme on master branch.

/**
 * render / format options
 */
export type Opts = {
  /** the relative date */
  readonly relativeDate?: TDate;
  /** the realtime */
  readonly minInterval?: number;
};
hustcc commented 5 years ago

v4.0.0 released.