aboutsummaryrefslogtreecommitdiff
path: root/src/lib.ts
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2023-01-02 17:47:38 +1100
committerTerry Truong <terry06890@gmail.com>2023-01-02 17:47:38 +1100
commitd48f3b862fad74af6576297d471d7834b1f0bba8 (patch)
tree1a3ca9490711749304bb5ab59f7fcd7ed77d96e1 /src/lib.ts
parentd67b35629905b6c26648c7979c28c333664f102f (diff)
Make baseline time-spans non-overlapping
Remove time-span labels Fix firstDate/lastDate being passed to TimelineState instead of startDate/endDate
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 d9d5867..804e352 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;