import { TimeUtil } from "https://deno.land/x/sptaki@1.2.0/utils/mod.ts";
Utility class to handle time related operations.
Methods
protected
pad(number: number): stringPads a number with a leading zero if it is less than 10.
formatDate(date: Date): string
Formats the date part of a date as a UTC string.
formatTime(date: Date): string
Formats the time part of a date as a UTC string.
getDate(): string
Gets the current date as a formatted UTC string.
getDateMailFormat(): string
Gets the current date in UTC in a format suitable for emails in EFT.
getHoursAsSeconds(hours: number): number
Converts a number of hours into seconds.
getTime(): string
Gets the current time as a formatted UTC string.
getTimeMailFormat(): string
Gets the current time in UTC in a format suitable for mail in EFT.
getTimestamp(): number
Gets the current timestamp in seconds in UTC.
getTimestampOfNextHour(): number