Dayjs: Considering add duration?

Created on 9 May 2018  路  10Comments  路  Source: iamkun/dayjs

In moment I use duration a lot.

Most helpful comment

Update:

Duration [email protected]
https://day.js.org/docs/en/durations/durations


Will support as a plugin later.

All 10 comments

Update:

Duration [email protected]
https://day.js.org/docs/en/durations/durations


Will support as a plugin later.

@kangkang07 Do you mean moment.duration(Number, String);?

Could your please tell us what's this API used for in moment.js? I'm not familiar with this.

@xx45 Yes

@kangkang07

check RelativeTime Plugin

This should suits you.

@kangkang07 this may or may not be applicable... but I used duration in moment for calculating ages.. I've found dayjs.diff suites my needs.

dayjs.diff(birthday, 'year')

I'll close this issue since it's been a while since it's been opened. Feel free to reopen if you have updates on this

Any chance this could be reopened? Specifically looking for a plugin that can handle ISO duration format. https://en.wikipedia.org/wiki/ISO_8601#Durations and output the total amount of minutes, etc.

@probablyup

will do 馃榿

@iamkun Is there an ETA/release timeline for this? This would be an amazing feature to have!

564 todo: Duration Plugin

Was this page helpful?
0 / 5 - 0 ratings