dt-i18n
Version:
A lightweight, modular JavaScript/TypeScript date and time utility with built-in internationalization (i18n) support for many languages.
19 lines (18 loc) • 613 B
TypeScript
import { DateUtils } from './DateUtils';
import { Duration } from './Duration';
export declare class Interval {
start: DateUtils;
end: DateUtils;
constructor(start: DateUtils, end: DateUtils);
/**
* Checks if a given date is within the interval (inclusive).
* @param date The date to check.
* @returns True if the date is within the interval.
*/
contains(date: Date | string | number | DateUtils): boolean;
/**
* Returns the duration of the interval.
* @returns A Duration object representing the length of the interval.
*/
toDuration(): Duration;
}