idea-toolbox
Version:
IDEA's utility functions
30 lines (29 loc) • 747 B
TypeScript
import { Resource } from './resource.model';
/**
* An interval between two moments of the same day.
* Note well: the timestamps should be stored and displayed considering UTC time (i.e. without any timezone).
*/
export declare class TimeInterval extends Resource {
/**
* The moment in the day (UTC), when the interval starts; in ms.
*/
from: number;
/**
* The moment in the day (UTC), when the interval ends; in ms.
*/
to: number;
load(x: any): void;
validate(): string[];
/**
* Get the duration of the interval (ms).
*/
getDuration(): number;
/**
* Whether the interval is set.
*/
isSet(): boolean;
/**
* Reset the interval.
*/
reset(): void;
}