mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
This commit is contained in:
commit
0353a7f617
@ -5,7 +5,17 @@ const dateTimeIntervals = {
|
||||
};
|
||||
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user