date.d.ts 591 B

123456789101112
  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. */
  8. export declare function serialiseDate(date: Date, 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. */
  12. export declare function parseDateTimeFromString(value: string): Date | null;