createTime
Creates a new PreTime
from the given parameters.
fromJsDate
Type definition
fromJsDate: (jsDate: Date) => PreDateTime;
Example
const time = createTime.fromJsDate(new Date());
fromArray
Type definition
fromArray: (dateArray: readonly [
hours: number,
minutes: number,
seconds?: number,
milliseconds?: number
]) => PreDateTime;
Example
const time = createTime.fromArray([12, 0]);
fromObject
Type definition
fromObject: (dateObject: {
readonly hours: number;
readonly minutes: number;
readonly seconds?: number;
readonly milliseconds?: number;
}) => PreDateTime;
Example
const time = createTime.fromObject({
hours: 12,
minutes: 0,
});
fromParams
Type definition
fromParams: (
hours: number,
minutes: number,
seconds?: number,
milliseconds?: number
) => PreDateTime;
Example
const time = createTime.fromParams(12, 0);