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

fix: update Duration plugin to support global locale #1008

Merged
merged 1 commit into from
Aug 18, 2020
Merged

Conversation

iamkun
Copy link
Owner

@iamkun iamkun commented Aug 16, 2020

fix #1007

this will support set duration plugin global locale

dayjs.locale('zh-cn')

dayjs.duration(24 * 60 * 60 * 1000).humanize() // in zh-cn locale

@codecov
Copy link

codecov bot commented Aug 16, 2020

Codecov Report

Merging #1008 into dev will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               dev     #1008   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          171       171           
  Lines         1485      1486    +1     
  Branches       314       313    -1     
=========================================
+ Hits          1485      1486    +1     
Impacted Files Coverage Δ
src/plugin/duration/index.js 100.00% <100.00%> (ø)

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 5a465cc...8c8b967. Read the comment docs.

@iamkun iamkun merged commit 1c49c83 into dev Aug 18, 2020
@iamkun iamkun deleted the fix/duration-global branch August 20, 2020 03:27
iamkun pushed a commit that referenced this pull request Aug 20, 2020
## [1.8.34](v1.8.33...v1.8.34) (2020-08-20)

### Bug Fixes

* Fix Timezone plugin to preserve milliseconds while changing timezone ([#1003](#1003)) ([5f446ed](5f446ed)), closes [#1002](#1002)
* support parsing unlimited decimals of millisecond ([#1010](#1010)) ([d1bdd36](d1bdd36)), closes [#544](#544)
* update Duration plugin to support global locale ([#1008](#1008)) ([1c49c83](1c49c83)), closes [#1007](#1007)
@iamkun
Copy link
Owner Author

iamkun commented Aug 20, 2020

🎉 This PR is included in version 1.8.34 🎉

The release is available on:

Your semantic-release bot 📦🚀

andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this pull request May 10, 2022
## [1.8.34](iamkun/dayjs@v1.8.33...v1.8.34) (2020-08-20)

### Bug Fixes

* Fix Timezone plugin to preserve milliseconds while changing timezone ([#1003](iamkun/dayjs#1003)) ([5f446ed](iamkun/dayjs@5f446ed)), closes [#1002](iamkun/dayjs#1002)
* support parsing unlimited decimals of millisecond ([#1010](iamkun/dayjs#1010)) ([d1bdd36](iamkun/dayjs@d1bdd36)), closes [#544](iamkun/dayjs#544)
* update Duration plugin to support global locale ([#1008](iamkun/dayjs#1008)) ([1c49c83](iamkun/dayjs@1c49c83)), closes [#1007](iamkun/dayjs#1007)
andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this pull request May 10, 2022
## [1.8.34](iamkun/dayjs@v1.8.33...v1.8.34) (2020-08-20)

### Bug Fixes

* Fix Timezone plugin to preserve milliseconds while changing timezone ([#1003](iamkun/dayjs#1003)) ([5f446ed](iamkun/dayjs@5f446ed)), closes [#1002](iamkun/dayjs#1002)
* support parsing unlimited decimals of millisecond ([#1010](iamkun/dayjs#1010)) ([d1bdd36](iamkun/dayjs@d1bdd36)), closes [#544](iamkun/dayjs#544)
* update Duration plugin to support global locale ([#1008](iamkun/dayjs#1008)) ([1c49c83](iamkun/dayjs@1c49c83)), closes [#1007](iamkun/dayjs#1007)
splashwizard pushed a commit to splashwizard/tracking-time that referenced this pull request Oct 21, 2024
## [1.8.34](iamkun/dayjs@v1.8.33...v1.8.34) (2020-08-20)

### Bug Fixes

* Fix Timezone plugin to preserve milliseconds while changing timezone ([#1003](iamkun/dayjs#1003)) ([5f446ed](iamkun/dayjs@5f446ed)), closes [#1002](iamkun/dayjs#1002)
* support parsing unlimited decimals of millisecond ([#1010](iamkun/dayjs#1010)) ([d1bdd36](iamkun/dayjs@d1bdd36)), closes [#544](iamkun/dayjs#544)
* update Duration plugin to support global locale ([#1008](iamkun/dayjs#1008)) ([1c49c83](iamkun/dayjs@1c49c83)), closes [#1007](iamkun/dayjs#1007)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dayjs.duration().humanize() international
1 participant