Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

eslint: Fix unicorn/consistent-date-clone.

Anders Kaseorg579447bb43c1
diff --git a/web/src/stats/stats.ts b/web/src/stats/stats.ts
index f11f66507e5..d100b69cfec 100644
--- a/web/src/stats/stats.ts
+++ b/web/src/stats/stats.ts
@@ -162,7 +162,7 @@ function partial_sums(array: number[]): number[] {
// Assumes date is a round number of hours
function floor_to_local_day(date: Date): Date {
- const date_copy = new Date(date.getTime());
+ const date_copy = new Date(date);
date_copy.setHours(0);
return date_copy;
}