From 7411855644883e6a300ccde898776c4a490fa8c8 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Wed, 25 Mar 2020 08:34:04 +0100 Subject: [PATCH] Complete countdown timer implementation --- src/helpers/PostsHelper.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/helpers/PostsHelper.ts b/src/helpers/PostsHelper.ts index 94f6b23..ff83a67 100644 --- a/src/helpers/PostsHelper.ts +++ b/src/helpers/PostsHelper.ts @@ -100,10 +100,10 @@ export class PostsHelper { // Movies post idvideo: p.hasMovie ? p.movieID : null, - // Countdown timer (TODO : implement) - jour_fin: null, - mois_fin: null, - annee_fin: null, + // Countdown timer + jour_fin: p.hasTimeEnd ? new Date(p.timeEnd*1000).getDate() : null, + mois_fin: p.hasTimeEnd ? new Date(p.timeEnd*1000).getMonth() +1 : null, + annee_fin: p.hasTimeEnd ? new Date(p.timeEnd*1000).getFullYear() : null, time_end: p.hasTimeEnd ? p.timeEnd : null, // Weblink