mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 14:07:38 -07:00
CI通らないの修正 (#6173)
* CI通らないの修正 * Revert "CI通らないの修正" This reverts commit 3eab7eab90050d60f0222ac0d08da7be0a53c300. * ts-ignore * んー
This commit is contained in:
parent
7f30b8cb5a
commit
9ccca14325
1 changed files with 11 additions and 1 deletions
|
@ -5,7 +5,17 @@ const dateTimeIntervals = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export function dateUTC(time: number[]): Date {
|
export function dateUTC(time: number[]): Date {
|
||||||
return new Date(Date.UTC(...time));
|
const d = time.length === 2 ? Date.UTC(time[0], time[1])
|
||||||
|
: time.length === 3 ? Date.UTC(time[0], time[1], time[2])
|
||||||
|
: time.length === 4 ? Date.UTC(time[0], time[1], time[2], time[3])
|
||||||
|
: time.length === 5 ? Date.UTC(time[0], time[1], time[2], time[3], time[4])
|
||||||
|
: time.length === 6 ? Date.UTC(time[0], time[1], time[2], time[3], time[4], time[5])
|
||||||
|
: time.length === 7 ? Date.UTC(time[0], time[1], time[2], time[3], time[4], time[5], time[6])
|
||||||
|
: null;
|
||||||
|
|
||||||
|
if (!d) throw 'wrong number of arguments';
|
||||||
|
|
||||||
|
return new Date(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isTimeSame(a: Date, b: Date): boolean {
|
export function isTimeSame(a: Date, b: Date): boolean {
|
||||||
|
|
Loading…
Reference in a new issue