Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new duration plugin #567

Closed
wants to merge 1 commit into from
Closed

added new duration plugin #567

wants to merge 1 commit into from

Conversation

waseemahmad31
Copy link
Contributor

@waseemahmad31 waseemahmad31 commented Apr 14, 2019

Fix issue #414

Added new duration plugin

  const dayjsA = dayjs(new Date(2018, 3, 3, 4, 45, 45, 400))
  const dayjsB = dayjs(new Date(2019, 4, 15, 11, 20, 34, 700))
  const result = dayjsA.duration(dayjsB)
 console.log(result)
//output
{
    years: 1,
    months: 1,
    days: 12,
    hours: 6,
    minute: 34,
    second: 49,
    millisecond:  300
}

@codecov-io
Copy link

codecov-io commented Apr 14, 2019

Codecov Report

Merging #567 into dev will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##            dev   #567   +/-   ##
===================================
  Coverage   100%   100%           
===================================
  Files       153    154    +1     
  Lines       958   1004   +46     
  Branches    128    135    +7     
===================================
+ Hits        958   1004   +46
Impacted Files Coverage Δ
src/plugin/duration/index.js 100% <100%> (ø)
src/constant.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c4921ae...aa8a057. Read the comment docs.

@iamkun
Copy link
Owner

iamkun commented Apr 15, 2019

Thanks.

What I'm doing now is to make a duration plugin that is fully (or at least most) compatible with moment.duration.

I'll close this PR cause this is not the plugin I'm looking for.

Cheers.

Ref: #564

@iamkun iamkun closed this Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants