smarttime/dist_ts/smarttime.classes.timestamp.d.ts

46 lines
1.2 KiB
TypeScript
Raw Normal View History

2020-05-25 21:45:43 +00:00
/**
* TimeStamp
* smart timestamp
*/
export declare class TimeStamp {
/**
* returns new TimeStamp from milliseconds
*/
static fromMilliSeconds(milliSecondsArg: any): TimeStamp;
/**
* returns new TimeStamp for now with change set
* @param timeStampArg
*/
static fromTimeStamp(timeStampArg: TimeStamp): TimeStamp;
/**
* The standard JavaScript Date
*/
date: Date;
/**
* The time as linux time (milliseconds, not seconds though)
* good for comparison
*/
milliSeconds: number;
/**
* The standard epoch time in seconds
*/
epochtime: number;
/**
* if derived from another TimeStamp points out the change in milliseconds
*/
change: number;
constructor(creatorArg?: number);
/**
* Is the current instance older than the argument
* @param TimeStampArg
*/
isOlderThan(TimeStampArg: TimeStamp, tresholdTimeArg?: number): boolean;
/**
* returns a boolean for wether a timestamp is younger
* @param TimeStampArg
* @param tresholdTimeArg
*/
isYoungerThanOtherTimeStamp(TimeStampArg: TimeStamp, tresholdTimeArg?: number): boolean;
isYoungerThanMilliSeconds(millisecondArg: number): boolean;
}