UNPKG

@tsdotnet/date-time

Version:

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/tsdotnet/date-time/blob/master/LICENSE) ![npm-publish](https://github.com/tsdotnet/date-time/workflows/npm-publish/badge.svg) [![npm version](htt

22 lines (21 loc) 686 B
/*! * @author electricessence / https://github.com/electricessence/ * Originally based upon .NET source but with many additions and improvements. * @license MIT */ import TimeQuantity from './TimeQuantity'; export declare namespace TimeUnit { enum UnitType { Ticks = 0, Milliseconds = 1, Seconds = 2, Minutes = 3, Hours = 4, Days = 5 } function toMilliseconds(value: number, units: UnitType): number; function fromMilliseconds(ms: number, units: UnitType): number; function from(quantity: TimeQuantity, toUnits: UnitType): number; function assertValid(unit: UnitType): true | never; } export default TimeUnit;