UNPKG

dt-i18n

Version:

A lightweight, modular JavaScript/TypeScript date and time utility with built-in internationalization (i18n) support for many languages.

12 lines (11 loc) 355 B
import { TimeUnit } from '../types'; export declare class Duration { private milliseconds; constructor(milliseconds: number); /** * Gets the duration in a specific unit of time. * @param unit The unit to get the duration in (e.g., 'days', 'hours'). * @returns The duration as a number. */ as(unit: TimeUnit): number; }