mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: highlight upcoming and current contest
This commit is contained in:
1 parent
fb19c8073f
commit
81076b4899
7 files changed
+19
-8
No files matched your search
@@ -527,7 +527,7 @@ export function isNew(tdoc: Tdoc, days = 1) {
|
||||
return (now < readyAt - days * 24 * 3600 * 1000);
|
||||
}
|
||||
|
||||
export function isUpcoming(tdoc: Tdoc, days = 1) {
|
||||
export function isUpcoming(tdoc: Tdoc, days = 7) {
|
||||
const now = new Date().getTime();
|
||||
const readyAt = tdoc.beginAt.getTime();
|
||||
return (now > readyAt - days * 24 * 3600 * 1000 && now < tdoc.beginAt.getTime());
|
||||
|
||||
Reference in new issue
Block a user