Skip to content

Commit c492618

Browse files
authored
Fix weeks not support in reminder command (#1977)
1 parent 4be7f12 commit c492618

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/time.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ export function timeSince (timeStamp) {
2323
}
2424

2525
export function datePivot (date,
26-
{ years = 0, months = 0, days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0 }) {
26+
{ years = 0, months = 0, weeks = 0, days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0 }) {
2727
return new Date(
2828
date.getFullYear() + years,
2929
date.getMonth() + months,
30-
date.getDate() + days,
30+
date.getDate() + days + weeks * 7,
3131
date.getHours() + hours,
3232
date.getMinutes() + minutes,
3333
date.getSeconds() + seconds,

0 commit comments

Comments
 (0)