date-vir
Version:
Easy and explicit dates and times.
57 lines (56 loc) • 1.44 kB
TypeScript
import { UtcIsoString } from '../formatting/string-format-types.js';
import { FullDate } from '../full-date/full-date-shape.js';
import { Timezone, 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>;