UNPKG

606 BTypeScriptView Raw
1/**
2 * Serialises a Date to a string of format `yyyy-MM-dd HH:mm:ss`.
3 * An alternative separator can be provided to be used instead of hyphens.
4 * @param date The date to serialise
5 * @param includeTime Whether to include the time in the serialised string
6 * @param separator The separator to use between date parts
7 */
8export declare function serialiseDate(date: Date | null, includeTime?: boolean, separator?: string): string | null;
9/**
10 * Parses a date and time from a string in the format `yyyy-MM-dd HH:mm:ss`
11 */
12export declare function parseDateTimeFromString(value?: string | null): Date | null;