UNPKG

date-vir

Version:

Easy and explicit dates and times.

18 lines (17 loc) 693 B
import { type AnyDuration } from '@date-vir/duration'; import { type FullDate } from '../full-date/full-date-shape.js'; import { type Timezone } from '../timezone/timezones.js'; /** * Calculates a new date starting at the given fullDate and adding the given offsets. Offsets can be * negative to go backwards in time. * * @category Calculation * @example * * ```ts * import {calculateRelativeDate} from 'date-vir'; * * calculateRelativeDate(getNowInUserTimezone(), {days: 2}); * ``` */ export declare function calculateRelativeDate<const SpecificTimezone extends Timezone>(fullDate: Readonly<FullDate<SpecificTimezone>>, offset: Readonly<AnyDuration>): FullDate<SpecificTimezone>;