fix
This commit is contained in:
parent
ab4dcaf4d1
commit
3714afe26a
|
@ -94,6 +94,7 @@ var events = [
|
|||
"subject": "Andy's Sheet for CapAdd",
|
||||
"notes": ""
|
||||
},
|
||||
{
|
||||
"date": "May 30, 2019 14:30:00",
|
||||
"subject": "TD's for JS vuln",
|
||||
"notes": "https://github.exacttarget.com/tholt/jvmversions results repo"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// meta
|
||||
var version = "0.10.012"
|
||||
var version = "0.10.013"
|
||||
var debug = false;
|
||||
|
||||
|
||||
|
|
|
@ -26,31 +26,12 @@ function countdown(targetDate, current) {
|
|||
minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
||||
seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
||||
|
||||
// Day or Days?
|
||||
if (days > 0) {
|
||||
if (days === 1){
|
||||
rDays = (days + ' Day ');
|
||||
} else {
|
||||
rDays = (days + ' Days ');
|
||||
}
|
||||
} else {
|
||||
rDays = '';
|
||||
}
|
||||
|
||||
// set style for countdown based on remaining time
|
||||
style = "green"; // reset style
|
||||
|
||||
if (current === "current") {
|
||||
style = 'current';
|
||||
/* if (nextDays < 1 && nextHours < 1) {
|
||||
if (nextMinutes < 0) {
|
||||
style = 'over';
|
||||
} else if (nextMinutes < 15) {
|
||||
style = 'warn';
|
||||
} else {
|
||||
style = 'green';
|
||||
}
|
||||
} */
|
||||
} else {
|
||||
if (days < 1 && hours < 1) {
|
||||
if (minutes < 0) {
|
||||
|
@ -63,6 +44,22 @@ function countdown(targetDate, current) {
|
|||
}
|
||||
}
|
||||
|
||||
if (days < 0) {
|
||||
days = (-days);
|
||||
days--;
|
||||
}
|
||||
|
||||
// Day or Days?
|
||||
if (days > 0) {
|
||||
if (days === 1){
|
||||
rDays = (days + ' Day ');
|
||||
} else {
|
||||
rDays = (days + ' Days ');
|
||||
}
|
||||
} else {
|
||||
rDays = '';
|
||||
}
|
||||
|
||||
// pad single digits with a '0' prefix
|
||||
// when time is out, start counting up by inverting
|
||||
if (hours < 0) {
|
||||
|
|
Loading…
Reference in New Issue