timezonecomplete
Version:
DateTime, TimeZone, Duration and Period library aimed at providing a consistent and complete date-time interface, away from the original JavaScript Date class.
23 lines (22 loc) • 548 B
TypeScript
/**
* Copyright(c) 2014 ABB Switzerland Ltd.
*/
/**
* For testing purposes, we often need to manipulate what the current
* time is. This is an interface for a custom time source object
* so in tests you can use a custom time source.
*/
export interface TimeSource {
/**
* Return the current date+time as a javascript Date object
* @throws nothing
*/
now(): Date;
}
/**
* Default time source, returns actual time
*/
export declare class RealTimeSource implements TimeSource {
/** @inheritdoc */
now(): Date;
}