UNPKG

@genexus/web-standard-functions

Version:

GeneXus JavaScript standard functions library for web generators

19 lines 687 B
/** * To return the time in the 'hh:mm:ss' format. * @return String */ export var time_format; (function (time_format) { time_format[time_format["format_12"] = 12] = "format_12"; time_format[time_format["format_24"] = 24] = "format_24"; })(time_format || (time_format = {})); import { GxDatetime } from "../types/gxdatetime"; export const timeImpl = (tf, date) => { let format = tf === time_format.format_12 ? "en-US" : "en-GB"; return (date || new GxDatetime()).toLocaleTimeString(format); }; export const time = () => { // TODO get timeformat from app preferences return timeImpl(time_format.format_12, new GxDatetime()); }; //# sourceMappingURL=time.js.map