Fix demo schedule origin being on Saturday
It was intended to have Monday as the origin point.
This commit is contained in:
parent
e703902c5e
commit
3da83a7feb
1 changed files with 2 additions and 2 deletions
|
@ -118,11 +118,11 @@ function toSlot(origin: Date, id: string, shorthand: string, index: number): Tim
|
|||
export function generateDemoSchedule(): Schedule {
|
||||
const origin = new Date();
|
||||
const utcOffset = 1;
|
||||
origin.setUTCDate(origin.getUTCDate() - origin.getUTCDay() - 1); // Go to Monday
|
||||
origin.setUTCDate(origin.getUTCDate() - origin.getUTCDay() + 1); // Go to Monday
|
||||
origin.setUTCHours(utcOffset);
|
||||
origin.setUTCMinutes(0);
|
||||
origin.setUTCSeconds(0);
|
||||
origin.setMilliseconds(0);
|
||||
origin.setUTCMilliseconds(0);
|
||||
|
||||
return {
|
||||
events: events.map(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue