summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/assets/js/lib/views/index/countdown.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/public/assets/js/lib/views/index/countdown.js b/public/assets/js/lib/views/index/countdown.js
index f2fd666..6020e9d 100644
--- a/public/assets/js/lib/views/index/countdown.js
+++ b/public/assets/js/lib/views/index/countdown.js
@@ -27,9 +27,17 @@ var Countdown = View.extend({
now /= 60
var hours = Math.floor(now % 24)
now /= 24
- var days = Math.floor(now)
+ var days = Math.floor(now % 7)
+ now /= 7
+ var weeks = Math.floor(now)
var date_string = [
- "<big><b>", days, 'days</big></b>',
+ '<big><b>',
+ (weeks ? (
+ (weeks && days) ? weeks + ' weeks,' : weeks + ' weeks'
+ ) : ''
+ ),
+ (days ? days + ' days' : ''),
+ '</big></b>',
hours, 'hours,',
minutes, 'minutes,',
seconds, 'seconds',