html5-infobeamer-aalen-geek.../assets/js/custom/core/time.js
2023-11-01 01:59:19 +01:00

86 lines
3.1 KiB
JavaScript

'use strict';
// Fake 'now' date time for testing
const fakeNow = null;
// const fakeNow = Date.parse("2022-09-22T07:30:00");
// const fakeNow = Date.parse("2022-09-22T07:53:50");
// const fakeNow = Date.parse("2022-09-22T07:55:00");
// const fakeNow = Date.parse("2022-09-22T07:58:50");
// const fakeNow = Date.parse("2022-09-22T07:59:50");
// const fakeNow = Date.parse("2022-09-22T08:00:00");
// const fakeNow = Date.parse("2022-09-22T08:48:50");
// const fakeNow = Date.parse("2022-09-22T08:49:50");
// const fakeNow = Date.parse("2022-09-22T08:50:50");
// const fakeNow = Date.parse("2022-09-22T08:51:50");
// const fakeNow = Date.parse("2022-09-22T08:53:50");
// const fakeNow = Date.parse("2022-09-22T08:58:50");
// const fakeNow = Date.parse("2022-09-22T08:59:50");
// const fakeNow = Date.parse("2022-09-22T09:00:00");
// const fakeNow = Date.parse("2022-09-22T09:00:50");
// const fakeNow = Date.parse("2022-09-22T09:01:50");
// const fakeNow = Date.parse("2022-09-22T09:15:00");
// const fakeNow = Date.parse("2022-09-22T10:00:00");
// const fakeNow = Date.parse("2022-09-22T10:38:50");
// const fakeNow = Date.parse("2022-09-22T10:40:00");
// const fakeNow = Date.parse("2022-09-22T10:33:00");
// const fakeNow = Date.parse("2022-09-22T10:37:00");
// const fakeNow = Date.parse("2022-09-22T10:39:00");
// const fakeNow = Date.parse("2022-09-22T10:59:50");
// const fakeNow = Date.parse("2022-09-22T11:03:00");
// const fakeNow = Date.parse("2022-09-22T11:03:50");
// const fakeNow = Date.parse("2022-09-22T11:04:50");
// const fakeNow = Date.parse("2022-09-22T11:08:50");
// const fakeNow = Date.parse("2022-09-22T11:09:50");
// const fakeNow = Date.parse("2022-09-22T11:10:00");
// const fakeNow = Date.parse("2022-09-22T11:40:00");
// const fakeNow = Date.parse("2022-09-22T12:10:00");
// const fakeNow = Date.parse("2022-09-22T12:38:50");
// const fakeNow = Date.parse("2022-09-22T12:40:00");
// const fakeNow = Date.parse("2022-09-22T13:48:50");
// const fakeNow = Date.parse("2022-09-22T13:53:50");
// const fakeNow = Date.parse("2022-09-22T14:00:00");
// const fakeNow = Date.parse("2022-09-22T14:30:00");
// const fakeNow = Date.parse("2022-09-22T14:53:50");
// const fakeNow = Date.parse("2022-09-22T15:00:00");
// const fakeNow = Date.parse("2022-09-22T15:45:00");
// const fakeNow = Date.parse("2022-09-22T16:15:00");
// const fakeNow = Date.parse("2022-09-22T16:45:00");
// const fakeNow = Date.parse("2022-09-22T16:58:50");
// const fakeNow = Date.parse("2022-09-22T17:00:00");
// const fakeNow = Date.parse("2022-09-22T17:01:00");
// const fakeNow = Date.parse("2022-09-22T19:48:50");
// const fakeNow = Date.parse("2022-09-22T19:49:50");
// const fakeNow = Date.parse("2022-09-22T19:58:50");
// const fakeNow = Date.parse("2022-09-22T20:00:00");
// const fakeNow = Date.parse("2022-09-22T20:02:00");
const fakeTimeDelta = fakeNow === null ? 0 : fakeNow - Date.now();
// Real 'now' date time for production
const nowJS = () => Date.now() + fakeTimeDelta;
// Real 'now' date time for production as luxon DateTime object
const now = () => luxon.DateTime.fromMillis(nowJS());
export {
now
}