chore(deps): remove moment for date-fns

This commit is contained in:
c43721 2022-07-09 18:06:01 +00:00 committed by GitHub
parent 8a02bbcb8c
commit 3e5a8ae54d
3 changed files with 1356 additions and 598 deletions

1948
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -39,12 +39,12 @@
"dependencies": {
"cheerio": "^1.0.0-rc.10",
"compressjs": "^1.0.2",
"date-fns": "^2.28.0",
"gbxremote": "^0.2.1",
"got": "^12.0.3",
"iconv-lite": "^0.6.3",
"long": "^5.2.0",
"minimist": "^1.2.6",
"moment": "^2.29.3",
"punycode": "^2.1.1",
"varint": "^6.0.0"
},

View file

@ -1,4 +1,4 @@
const moment = require('moment'),
const { format } = require('date-fns'),
Core = require('./core');
class OpenTtd extends Core {
@ -116,7 +116,7 @@ class OpenTtd extends Core {
const temp = new Date(0,0,1);
temp.setFullYear(0);
temp.setDate(daysSinceZero+1);
return moment(temp).format('YYYY-MM-DD');
return format(temp, 'YYYY-MM-DD');
}
decode(num,arr) {