UNPKG

date-vir

Version:

Easy and explicit dates and times.

57 lines (56 loc) 1.46 kB
import { type UtcIsoString } from '../formatting/string-format-types.js'; import { type FullDate } from '../full-date/full-date-shape.js'; import { type Timezone, type UtcTimezone } from '../timezone/timezones.js'; /** * Get the time right now as a UTC ISO. * * @category Now * @example * * ```ts * import {getNowInIsoString} from 'date-vir'; * * getNowInIsoString(); * ``` */ export declare function getNowInIsoString(): UtcIsoString; /** * Get the time right now as a {@link FullDate} represented in the current user's timezone. * * @category Now * @example * * ```ts * import {getNowInUserTimezone} from 'date-vir'; * * getNowInUserTimezone(); * ``` */ export declare function getNowInUserTimezone(): FullDate; /** * Get the time right now as a {@link FullDate} represented in the UTC timezone. * * @category Now * @example * * ```ts * import {getNowInUtcTimezone} from 'date-vir'; * * getNowInUtcTimezone(); * ``` */ export declare function getNowInUtcTimezone(): FullDate<UtcTimezone>; /** * Get the time right now as a {@link FullDate} represented in the given timezone. * * @category Now * @example * * ```ts * import {getNowFullDate, utcTimezone, timezones} from 'date-vir'; * * getNowFullDate(utcTimezone); * getNowFullDate(timezones['Australia/Brisbane']); * ``` */ export declare function getNowFullDate<const SpecificTimezone extends Timezone>(timezone: SpecificTimezone): FullDate<SpecificTimezone>;