From 22d96bbd8d2f3c63328e0beb4e192eb9bf3d5ce3 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 13 Oct 2024 22:23:59 +0200 Subject: Format human dates in view templates rather than in server queries. --- views/games_active.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views/games_active.pug') diff --git a/views/games_active.pug b/views/games_active.pug index eaa1076..f47ae6e 100644 --- a/views/games_active.pug +++ b/views/games_active.pug @@ -5,7 +5,7 @@ - let move_games = games.filter(game => game.status === 1 && game.is_opposed && game.your_turn) - let solo_games = games.filter(game => game.status === 1 && !game.is_opposed) - let finished_games = games.filter(game => game.status === 2) -- move_games.sort((a,b)=>a.time_left-b.time_left) +- move_games.sort((a,b)=> a.mtime < b.mtime ? -1 : a.mtime > b.mtime ? 1 : 0) doctype html html head -- cgit v1.2.3