createDate
Creates a new PreDate
from the given parameters.
fromJsDate
Type definition
fromJsDate: (jsDate: Date) => PreDate;
Example
const date = createDate.fromJsDate(new Date());
fromArray
Type definition
fromArray: (dateArray: readonly [
year: number,
month: number,
day: number
]) => PreDate;
Example
const date = createDate.fromArray([2022, 1, 1]);
fromObject
Type definition
fromObject: (dateObject: {
readonly year: number;
readonly month: number;
readonly day: number;
}) => PreDate;
Example
const date = createDate.fromObject({
year: 2022,
month: 1,
day: 1,
});
fromParams
Type definition
fromParams: (year: number, month: number, day: number) => PreDate;
Example
const date = createDate.fromParams(2022, 1, 1);