mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-22 14:01:42 +03:00
fix: iso duration test case
This commit is contained in:
1 parent
2956b08766
commit
b1dce63fac
2 files changed
+20
-13
No files matched your search
@@ -173,19 +173,19 @@ describe('duration-calculator', () => {
|
||||
expect(computeDuration('P4DT12H20M20.3S')).to.deep.eq({
|
||||
errors: [],
|
||||
total: {
|
||||
days: 0.5138891238425926,
|
||||
hours: 12.333338972222222,
|
||||
iso8601Duration: 'P0Y0M0DT12H20M0S',
|
||||
milliseconds: 44400020.3,
|
||||
minutes: 740.0003383333333,
|
||||
prettified: '12h 20m',
|
||||
prettifiedColonNotation: '12:20:00',
|
||||
prettifiedDaysColon: '12:20:00.20.299999997019768',
|
||||
prettifiedHoursColon: '12:20:00.20.299999997019768',
|
||||
prettifiedVerbose: '12 hours 20 minutes',
|
||||
seconds: 44400.0203,
|
||||
weeks: 0.07341273197751322,
|
||||
years: 0.0014079154077879248,
|
||||
days: 0.5141238425925926,
|
||||
hours: 12.338972222222223,
|
||||
iso8601Duration: 'P0Y0M0DT12H20M20S',
|
||||
milliseconds: 44420300,
|
||||
minutes: 740.3383333333334,
|
||||
prettified: '12h 20m 20.3s',
|
||||
prettifiedColonNotation: '12:20:20.3',
|
||||
prettifiedDaysColon: '12:20:20.300',
|
||||
prettifiedHoursColon: '12:20:20.300',
|
||||
prettifiedVerbose: '12 hours 20 minutes 20.3 seconds',
|
||||
seconds: 44420.3,
|
||||
weeks: 0.07344626322751323,
|
||||
years: 0.0014085584728564182,
|
||||
},
|
||||
});
|
||||
expect(computeDuration('25s\n+PT20H\n-10s')).to.deep.eq({
|
||||
|
||||
Reference in new issue
Block a user