Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

handle dates before and after wedding

  • Loading branch information...
commit 19db8213d567d5668bd5f7a0723c1b75ce3992dc 1 parent d827501
@youngnh authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 js/wedding.js
View
8 js/wedding.js
@@ -14,7 +14,13 @@ function countdown() {
var daysToGo = Math.ceil(((((bigDay - today) / 1000) / 60) / 60) / 24);
- $('#days_to_go').replaceWith(daysToGo + " days to go!");
+ if(daysToGo < 0) {
+ $('#days_to_go').replaceWith(daysToGo + " days to go!");
+ } else if(daysToGo == 0) {
+ $('#days_to_go').replaceWith("It's the big day!");
+ } else {
+ $('#days_to_go').replaceWith("Happily married for " + (daysToGo * -1) + " days!");
+ }
}
function wireUpMenu() {
Please sign in to comment.
Something went wrong with that request. Please try again.