now?
This commit is contained in:
parent
4cbe227827
commit
1c9c76f721
@ -34,13 +34,9 @@ export function timeAgo(input: Date | number) {
|
|||||||
* @param date the date
|
* @param date the date
|
||||||
*/
|
*/
|
||||||
export function getMidnightAlignedDate(date: Date) {
|
export function getMidnightAlignedDate(date: Date) {
|
||||||
const midnightDate = new Date(
|
return new Date(
|
||||||
date.getFullYear(),
|
Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()),
|
||||||
date.getMonth(),
|
|
||||||
date.getDate(),
|
|
||||||
);
|
);
|
||||||
midnightDate.setUTCHours(0, 0, 0, 0);
|
|
||||||
return midnightDate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user