1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.formatDate = void 0;
|
4 |
|
5 | function zeroPad(value) {
|
6 | return value.toString().padStart(2, '0');
|
7 | }
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | function formatDate(date) {
|
13 | const year = date.getFullYear().toString();
|
14 | const month = zeroPad((date.getMonth() + 1));
|
15 | const day = zeroPad(date.getDate());
|
16 | const hour = zeroPad(date.getHours());
|
17 | const minute = zeroPad(date.getMinutes());
|
18 | const second = zeroPad(date.getSeconds());
|
19 | return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
20 | }
|
21 | exports.formatDate = formatDate;
|