Add parsing ASP.NET style time duration for Duration plugin
The format is an hour, minute, second string separated by colons like 23:59:59. The number of days can be prefixed with a dot or a space separator like so 7.23:59:59 or 7 23:59:59. Partial seconds are supported as well 23:59:59.
dayjs.duration('23:59:59');
dayjs.duration('7.23:59:59');
dayjs.duration('7 23:59:59');
dayjs.duration('23:59');
Note: This usage method depends on Duration plugin
Well, I think dayjs should only parse standard ISO format.
Maybe it will be better to publish this ASP duration parser dayjs plugin as a separate package.
Codecov Report
Merging #1624 (f7fbf06) into dev (f68e4b1) will not change coverage. The diff coverage is
100.00%.
@@ Coverage Diff @@
## dev #1624 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 177 179 +2
Lines 1989 2004 +15
Branches 505 508 +3
=========================================
+ Hits 1989 2004 +15
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/plugin/duration/index.js | 100.00% <100.00%> (ø) |
|
| src/locale/nb.js | 100.00% <0.00%> (ø) |
|
| src/locale/ar-iq.js | 100.00% <0.00%> (ø) |
|
| src/locale/es-mx.js | 100.00% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update f68e4b1...f7fbf06. Read the comment docs.