deno.land / std@0.224.0 / datetime / constants.ts
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.// This module is browser compatible.
/** * The number of milliseconds in a second. * * @example * ```ts * import { SECOND } from "https://deno.land/std@$STD_VERSION/datetime/constants.ts"; * * SECOND; // 1_000 * ``` */export const SECOND = 1e3;/** * The number of milliseconds in a minute. * * @example * ```ts * import { MINUTE } from "https://deno.land/std@$STD_VERSION/datetime/constants.ts"; * * MINUTE; // 60_000 * ``` */export const MINUTE: number = SECOND * 60;/** * The number of milliseconds in an hour. * * @example * ```ts * import { HOUR } from "https://deno.land/std@$STD_VERSION/datetime/constants.ts"; * * HOUR; // 3_600_000 * ``` */export const HOUR: number = MINUTE * 60;/** * The number of milliseconds in a day. * * @example * ```ts * import { DAY } from "https://deno.land/std@$STD_VERSION/datetime/constants.ts"; * * DAY; // 86_400_000 * ``` */export const DAY: number = HOUR * 24;/** * The number of milliseconds in a week. * * @example * ```ts * import { WEEK } from "https://deno.land/std@$STD_VERSION/datetime/constants.ts"; * * WEEK; // 604_800_000 * ``` */export const WEEK: number = DAY * 7;
Version Info