diff --git a/lib/time.js b/lib/time.js index cce8f756..3609f904 100644 --- a/lib/time.js +++ b/lib/time.js @@ -23,11 +23,11 @@ export function timeSince (timeStamp) { } export function datePivot (date, - { years = 0, months = 0, days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0 }) { + { years = 0, months = 0, weeks = 0, days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0 }) { return new Date( date.getFullYear() + years, date.getMonth() + months, - date.getDate() + days, + date.getDate() + days + weeks * 7, date.getHours() + hours, date.getMinutes() + minutes, date.getSeconds() + seconds,