Skip to content

Commit

Permalink
Fix isToday function in JS.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtricht committed Feb 6, 2017
1 parent d02af65 commit 2f78320
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions assets/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@
}
function isToday(date) {
var dateObj = new Date();
var month = ('0' + dateObj.getUTCMonth() + 1).slice(-2);
var month = ('0' + (dateObj.getUTCMonth() + 1)).slice(-2);
var day = ('0' + dateObj.getUTCDate()).slice(-2);
var year = dateObj.getUTCFullYear();
return date == year + "-" + month + "-" + day;
}
</script>
{{ template "footer" }}
{{ end }}
{{ end }}
6 changes: 3 additions & 3 deletions assets/views.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2f78320

Please sign in to comment.