2023-04-05 03:25:31 -06:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const MS_LOOKUP = {
|
|
|
|
ONE_DAY_IN_MS: 24 * 60 * 60 * 1000,
|
|
|
|
ONE_HOUR_IN_MS: 60 * 60 * 1000,
|
|
|
|
ONE_MINUTE_IN_MS: 60 * 1000,
|
|
|
|
ONE_SECOND_IN_MS: 1000,
|
|
|
|
};
|
|
|
|
|
|
|
|
const TIME_PRECISION_VALUES = {
|
|
|
|
// no time present - `/date/2022/11/16`
|
|
|
|
none: null,
|
|
|
|
// 23:59 - `/date/2022/11/16T23:59`
|
|
|
|
minutes: 'minutes',
|
|
|
|
// 23:59:59 - `/date/2022/11/16T23:59:59`
|
|
|
|
seconds: 'seconds',
|
|
|
|
// 23:59:59.999 - `/date/2022/11/16T23:59:59.999`
|
|
|
|
millisecond: 'millisecond',
|
|
|
|
};
|
|
|
|
|
|
|
|
const DIRECTION = {
|
|
|
|
forward: 'f',
|
|
|
|
backward: 'b',
|
|
|
|
};
|
|
|
|
|
2023-04-07 11:52:41 -06:00
|
|
|
const VALID_SIGIL_TO_ENTITY_DESCRIPTOR_MAP = {
|
|
|
|
'#': 'r',
|
|
|
|
'!': 'roomid',
|
|
|
|
};
|
|
|
|
|
2023-04-19 00:26:15 -06:00
|
|
|
const VALID_ENTITY_DESCRIPTOR_TO_SIGIL_MAP = {
|
|
|
|
r: '#',
|
|
|
|
roomid: '!',
|
|
|
|
};
|
|
|
|
|
2023-04-05 03:25:31 -06:00
|
|
|
module.exports = {
|
|
|
|
MS_LOOKUP,
|
|
|
|
TIME_PRECISION_VALUES,
|
|
|
|
DIRECTION,
|
2023-04-07 11:52:41 -06:00
|
|
|
VALID_SIGIL_TO_ENTITY_DESCRIPTOR_MAP,
|
2023-04-19 00:26:15 -06:00
|
|
|
VALID_ENTITY_DESCRIPTOR_TO_SIGIL_MAP,
|
2023-04-05 03:25:31 -06:00
|
|
|
};
|