mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
refactor: Remove today arg from absolute_time.
The today argument was only used in tests and now we're using MockDate to set the current date.
This commit is contained in:
committed by
Tim Abbott
parent
3d2110be51
commit
a43a898e12
@@ -465,7 +465,8 @@ export function format_time_modern(time: number | Date, today = new Date()): str
|
||||
|
||||
// this is for rendering absolute time based off the preferences for twenty-four
|
||||
// hour time in the format of "%mmm %d, %h:%m %p".
|
||||
export function absolute_time(timestamp: number, today = new Date()): string {
|
||||
export function absolute_time(timestamp: number): string {
|
||||
const today = new Date();
|
||||
const date = new Date(timestamp);
|
||||
const is_older_year = today.getFullYear() - date.getFullYear() > 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user