Skip to content

Commit

Permalink
chore: add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkun committed Dec 11, 2018
1 parent dbbdf26 commit 1eb3499
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Expand Up @@ -244,7 +244,7 @@ class Dayjs {
[C.MIN]: C.MILLISECONDS_A_MINUTE,
[C.H]: C.MILLISECONDS_A_HOUR,
[C.S]: C.MILLISECONDS_A_SECOND
}[unit] || 1
}[unit] || 1 // ms

const nextTimeStamp = this.valueOf() + (number * step)
return wrapper(nextTimeStamp, this)
Expand Down Expand Up @@ -296,7 +296,7 @@ class Dayjs {
ss: Utils.padStart(this.$s, 2, '0'),
SSS: Utils.padStart(this.$ms, 3, '0'),
Z: zoneStr
}[match] || zoneStr.replace(':', '')
}[match] || zoneStr.replace(':', '') // 'ZZ'
})
}

Expand All @@ -315,7 +315,7 @@ class Dayjs {
[C.H]: diff / C.MILLISECONDS_A_HOUR,
[C.MIN]: diff / C.MILLISECONDS_A_MINUTE,
[C.S]: diff / C.MILLISECONDS_A_SECOND
}[unit] || diff
}[unit] || diff // milliseconds

return float ? result : Utils.absFloor(result)
}
Expand Down

0 comments on commit 1eb3499

Please sign in to comment.