{"version":3,"sources":["../../src/app/util/TimeUtil.ts"],"names":["TimeUtil","constructor","year","month","day","hour","minute","formatter","Intl","DateTimeFormat","locale","options","e","format","time","TimeUtilInstance"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA,MAAMA,QAAN,CAAe;AAIXC,EAAAA,WAAW,GAAG;AAAA,qCAHI;AAAEC,MAAAA,IAAI,EAAE,SAAR;AAAmBC,MAAAA,KAAK,EAAE,MAA1B;AAAkCC,MAAAA,GAAG,EAAE,SAAvC;AAAkDC,MAAAA,IAAI,EAAE,SAAxD;AAAmEC,MAAAA,MAAM,EAAE;AAA3E,KAGJ;;AAAA;;AACV,QAAI;AACA,WAAKC,SAAL,GAAiB,IAAIC,IAAI,CAACC,cAAT,CAAwBC,MAAxB,EAAgC,KAAKC,OAArC,CAAjB;AACH,KAFD,CAEE,OAAMC,CAAN,EAAS;AACP;AACA,WAAKL,SAAL,GAAiB,IAAIC,IAAI,CAACC,cAAT,CAAwB,IAAxB,EAA8B,KAAKE,OAAnC,CAAjB;AACH;AACJ;;AAEDE,EAAAA,MAAM,CAACC,IAAD,EAAuB;AACzB,WAAO,KAAKP,SAAL,CAAeM,MAAf,CAAsBC,IAAtB,CAAP;AACH;;AAfU;;AAkBf,MAAMC,gBAA0B,GAAG,IAAIf,QAAJ,EAAnC;AACA,eAAee,gBAAf","sourcesContent":["/*\n * Copyright 2020 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ndeclare const locale: string;\n\n/**\n * @author Stan Silvert\n */\nclass TimeUtil {\n private options = { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric' };\n private formatter: Intl.DateTimeFormat;\n\n constructor() {\n try {\n this.formatter = new Intl.DateTimeFormat(locale, this.options);\n } catch(e) {\n // unknown locale falling back to English\n this.formatter = new Intl.DateTimeFormat('en', this.options);\n }\n }\n\n format(time: number): string {\n return this.formatter.format(time);\n }\n}\n\nconst TimeUtilInstance: TimeUtil = new TimeUtil();\nexport default TimeUtilInstance as TimeUtil;"],"file":"TimeUtil.js"}