web-ui-pack
Version:
Web package with UI elements
28 lines (27 loc) • 1.04 kB
TypeScript
/** Plane time-object without date */
export default class WUPTimeObject {
hours: number;
minutes: number;
static $maxValue: number;
constructor();
constructor(value: number | string);
/** @param isPM set true/false if hours is 12h format */
constructor(hours: number, minutes: number, isPM?: boolean);
/** Extract hh & mm from date */
constructor(value: Date, isUTC: boolean);
/** Copy hours & minutes to pointed Date
* @returns the same date object */
copyToDate(dt: Date, isUTC: boolean): Date;
/** Returns number representation of current object */
valueOf(): number;
/** Returns whether time is PM or AM */
get isPM(): boolean;
/** Returns string in "hh:mm" format */
toString(sep?: string): string;
/** Returns string according to objects/localeInfo.time format */
toLocaleString(): string;
/** Returns string according to pointed format (hh:mm) */
format(format: string): string;
/** Returns string in "h:m" format */
toJSON(): string;
}