Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 452 Bytes

diffing.md

File metadata and controls

15 lines (12 loc) · 452 Bytes
id title
diffing
Using Duration with Diff

You can also use duration with dayjs#diff to get the duration between two date times. To do so, simply pass the dayjs#diff method into dayjs#duration as follows:

var x = dayjs()
var y = dayjs()

var duration = dayjs.duration(x.diff(y))
// returns duration object with the duration between x and y

See here for more information about dayjs#diff.