Dayjs: Compute a human-readable difference between two date-times?

Created on 8 May 2018  路  2Comments  路  Source: iamkun/dayjs

(I did a quick Google for this and found nothing)

I would like to format the difference between two dates so that it is easily human-readable.

For example:

  • Just now
  • 1 hour ago
  • 3 days ago
  • etc...

Does daysjs provide this functionality?

Most helpful comment

@njlr added in release 1.6.4.馃帄 馃帀

check RelativeTime Plugin

All 2 comments

No for now, I'm afraid.

But we may could add such function through a plugin later.

@njlr added in release 1.6.4.馃帄 馃帀

check RelativeTime Plugin

Was this page helpful?
0 / 5 - 0 ratings