From d48f3b862fad74af6576297d471d7834b1f0bba8 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Mon, 2 Jan 2023 17:47:38 +1100 Subject: Make baseline time-spans non-overlapping Remove time-span labels Fix firstDate/lastDate being passed to TimelineState instead of startDate/endDate --- src/lib.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib.ts') 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; -- cgit v1.2.3