aboutsummaryrefslogtreecommitdiff
path: root/src/lib.ts
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2023-01-03 10:07:18 +1100
committerTerry Truong <terry06890@gmail.com>2023-01-03 10:07:18 +1100
commit2e6463419e46ed21e8906f6519dc732398250583 (patch)
treed91f41f83e208d1b42f97c2e9ada8257ac91de5a /src/lib.ts
parent6f34c4c3aafee39f8c7ec41a7777c194443a27fa (diff)
parentd48f3b862fad74af6576297d471d7834b1f0bba8 (diff)
Merge branch 'frontend-update' into backend-update
Diffstat (limited to 'src/lib.ts')
-rw-r--r--src/lib.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib.ts b/src/lib.ts
index e2d65f9..da18d94 100644
--- a/src/lib.ts
+++ b/src/lib.ts
@@ -363,8 +363,10 @@ if (DEBUG){
}
}
}
-export function stepDate( // If stepping by month or years, leaves day value unchanged
+export function stepDate( // Steps a date N units along a scale
date: HistDate, scale: number, {forward=true, count=1, inplace=false} = {}): HistDate {
+ // If stepping by month or years, leaves day value unchanged
+ // Does not account for stepping a CalDate into before MIN_CAL_YEAR
const newDate = inplace ? date : date.clone();
if (count < 0){
count = -count;