Dayjs: Feature request: Add Duration Plugin

Created on 9 Apr 2019  ·  24Comments  ·  Source: iamkun/dayjs

Update: DONE 🎉🎉🎉🎉🎉🎉

Duration
https://day.js.org/docs/en/durations/durations

v1.8.24


Official duration plugin https://github.com/iamkun/dayjs/pull/858


Goal: to keep the same with moment.duration

  1. Parse ISO duration format #122
  2. Duration object to ISO string toISOString() #519
  3. Using Duration with Diff .duration(x.diff(y)) #414

ref: https://en.wikipedia.org/wiki/ISO_8601#Durations




IssueHunt Summary

iamkun iamkun has been rewarded.

Backers (Total: $116.00)

Submitted pull Requests

Tips

IssueHunt has been backed by the following sponsors. Become a sponsor


discussion released

Most helpful comment

Any news on this?

All 24 comments

@issuehunt has funded $100.00 to this issue.


WIP

@xxyuk has funded $2.00 to this issue.


@zazzaz has funded $2.00 to this issue.


@waseemahmad31 has funded $2.00 to this issue.


Could this include functionality similar to moment-duration-format?

will include moment.duration in the first step

hi, may I work on this one? I did the plugin on my fork and it works
see:
durationISO8601

it return an object with this format:
const duration = { ISO: '', s: 0, m: 0, H: 0, D: 0, M: 0, y: 0 }

Any news on this?

alternative: humanize-duration package
it may be convenient to use that package as dependency in the Duration plugin

how I can use it?

Any news on this? (

Any news on this?

@muuvmuuv has funded $10.00 to this issue.


Hello, any news regarding the work on the duration plugin?

@lockee14 provided a PR (https://github.com/iamkun/dayjs/pull/621), is something preventing from merging it?

Thanks.

have the same 请尽快合并pr吧 @iamkun

Any updates here? Would really like to have it :)

Just to be clear.. I'm looking for something similar to https://momentjs.com/docs/#/durations/ :)

@iamkun any feed back would be greatly appreciated.. just to let us know an eta or even if this will ever happen.. :/

@iamkun has rewarded $104.40 to @iamkun. See it on IssueHunt

  • :moneybag: Total deposit: $116.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $11.60

Hooray !

Documentation missing and not yet released right?

@muuvmuuv will release in the next release this week.

:tada: This issue has been resolved in version 1.8.24 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ljmerza picture ljmerza  ·  3Comments

scottsandersdev picture scottsandersdev  ·  3Comments

paraself picture paraself  ·  3Comments

fundon picture fundon  ·  5Comments

eugeneoshepkov picture eugeneoshepkov  ·  3Comments