File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -60,13 +60,13 @@ export function timeLeftUntil(isoString: string): string {
60
60
const daysLeft = Math . floor ( hoursLeft / 24 ) ;
61
61
62
62
if ( secondsLeft < 60 ) {
63
- return `in ${ secondsLeft } secs ` ;
63
+ return `in ${ secondsLeft } sec ${ secondsLeft > 1 ? "s" : "" } ` ;
64
64
} else if ( minutesLeft < 60 ) {
65
- return `in ${ minutesLeft } mins ` ;
65
+ return `in ${ minutesLeft } min ${ minutesLeft > 1 ? "s" : "" } ` ;
66
66
} else if ( hoursLeft < 24 ) {
67
- return `in ${ hoursLeft } hrs ` ;
67
+ return `in ${ hoursLeft } hr ${ hoursLeft > 1 ? "s" : "" } ` ;
68
68
} else if ( daysLeft < 2 ) {
69
- return `in ${ daysLeft } days ` ;
69
+ return `in ${ daysLeft } day ${ daysLeft > 1 ? "s" : "" } ` ;
70
70
} else {
71
71
const options : Intl . DateTimeFormatOptions = { year : "numeric" , month : "long" , day : "numeric" } ;
72
72
return `after ${ targetDate . toLocaleDateString ( "en-US" , options ) } ` ;
You can’t perform that action at this time.
0 commit comments