Code coverage report for core/src/time/constants.ts

Statements: 100% (11 / 11)      Branches: 100% (0 / 0)      Functions: 100% (0 / 0)      Lines: 100% (11 / 11)      Ignored: none     

All files » core/src/time/ » constants.ts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29      1 1 1 1 1 1 1 1 1 1 1                              
import {TimeMeasurement} from './primitives';
 
 
export const NANOS_IN_MS = BigInt(1000000);
export const MS_IN_SEC = BigInt(1000);
export const NANOS_IN_SEC = NANOS_IN_MS * MS_IN_SEC;
export const NANOS_IN_MIN = NANOS_IN_SEC * BigInt(60);
export const NANOS_IN_HOUR = NANOS_IN_MIN * BigInt(60);
export const NANOS_IN_DAY = NANOS_IN_HOUR * BigInt(24);
export const NANOS_IN_WEEK = NANOS_IN_DAY * BigInt(7);
export const NANOS_IN_MONTH = NANOS_IN_DAY * BigInt(30);
export const NANOS_IN_YEAR = NANOS_IN_MONTH * BigInt(12);
export const NANOS_IN_DECADE = NANOS_IN_YEAR * BigInt(10);
export const NANOS_IN_CENTURY = NANOS_IN_DECADE * BigInt(100);
 
export type Milliseconds = number | bigint;
export type HrTime = [number, number];
export type Nanoseconds = bigint;
export type NanoTime = Nanoseconds | TimeMeasurement;
export type TimeAndRemainder = [bigint, bigint];
 
export type Hour = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12
                   | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
export type Month = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
export type DayOfMonth = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12
                         | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24
                         | 25 | 26 | 27 | 28 | 29 | 30 | 31;
export type DayOfWeek = 1 | 2 | 3 | 4 | 5 | 6 | 7;