UNPKG

date-vir

Version:

Easy and explicit dates and times.

27 lines (26 loc) 630 B
import { type FullDate } from '../full-date/full-date-shape.js'; /** * Convert a {@link FullDate} from a built-in JS * [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date). * * @category Conversion * @example * * ```ts * import {toJsDate, type FullDate} from 'date-vir'; * * const exampleDate: Readonly<FullDate> = { * year: 2024, * month: 1, * day: 5, * hour: 1, * minute: 1, * second: 1, * millisecond: 1, * timezone: 'UTC', * }; * * toJsDate(exampleDate); * ``` */ export declare function toJsDate(fullDate: Readonly<FullDate>): Date;