You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
can I please check in order to understand this library - it contains a test with the code:
it('02-06 and if saturday then previous friday if sunday then next monday in 2016',function(){constfn=newDateFn('02-06 14:00 and if saturday then previous friday 16:45 if sunday then next monday PT12H')constres=fn.inYear(2016).get()constexp=[{date: '2016-02-06 14:00:00',start: 'sat 2016-02-06 14:00',end: 'sun 2016-02-07 00:00'},{date: '2016-02-05 16:45:00',start: 'fri 2016-02-05 16:45',end: 'sat 2016-02-06 00:00',substitute: true}]assert.deepStrictEqual(fixResult(res),exp)})
my take on PT12H would be a timespan/duration of 12 hours, in which case the expected end dates should be 'sun 2016-02-07 02:00' and 'sat 2016-02-06 04:45' respectively. Is this test set up correctly?
The text was updated successfully, but these errors were encountered:
mcshaz
changed the title
parsing PT12H truncates end a t midnight - is this desired behaviour?
parsing PT12H truncates end at midnight - is this desired behaviour?
Jan 15, 2023
can I please check in order to understand this library - it contains a test with the code:
my take on PT12H would be a timespan/duration of 12 hours, in which case the expected
end
dates should be 'sun 2016-02-07 02:00' and 'sat 2016-02-06 04:45' respectively. Is this test set up correctly?The text was updated successfully, but these errors were encountered: