1 | "use strict";
|
2 |
|
3 | exports.__esModule = true;
|
4 | exports["default"] = void 0;
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | var monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
23 | var weekNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
24 |
|
25 |
|
26 | var DateHelper = function () {
|
27 | function DateHelper() {}
|
28 |
|
29 | var _proto = DateHelper.prototype;
|
30 |
|
31 | |
32 |
|
33 |
|
34 | _proto.getNowString = function getNowString() {
|
35 | var now = new Date();
|
36 | var weekDay = weekNames[now.getUTCDay()];
|
37 | var month = monthNames[now.getUTCMonth()];
|
38 | var day = now.getUTCDate();
|
39 | var hours = now.getUTCHours();
|
40 |
|
41 | if (hours < 10) {
|
42 | hours = "0" + hours;
|
43 | }
|
44 |
|
45 | var minutes = now.getUTCMinutes();
|
46 |
|
47 | if (minutes < 10) {
|
48 | minutes = "0" + minutes;
|
49 | }
|
50 |
|
51 | var seconds = now.getUTCSeconds();
|
52 |
|
53 | if (seconds < 10) {
|
54 | seconds = "0" + seconds;
|
55 | }
|
56 |
|
57 | var year = now.getUTCFullYear();
|
58 |
|
59 | var dateNow = weekDay + " " + month + " " + day + " " + hours + ":" + minutes + ":" + seconds + " UTC " + year;
|
60 | return dateNow;
|
61 | };
|
62 |
|
63 | return DateHelper;
|
64 | }();
|
65 |
|
66 | exports["default"] = DateHelper; |
\ | No newline at end of file |