diff options
Diffstat (limited to '_layouts/post.html')
-rw-r--r-- | _layouts/post.html | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/_layouts/post.html b/_layouts/post.html index 45fd562..95dd40d 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -12,12 +12,7 @@ layout: default <br /><br /> </div> <script> - BirthDay = new Date("{{ page.date | date_to_xmlschema }}"); - today = new Date(); - timeold = (today.getTime() - BirthDay.getTime()); - secondsold = Math.floor(timeold / 1000); - e_daysold = timeold / (24 * 60 * 60 * 1000); - daysold = Math.floor(e_daysold); + daysold = Math.floor((new Date().getTime() - new Date("{{ page.date | date_to_rfc822 }}").getTime()) / (24 * 60 * 60 * 1000)); if (daysold > 90) { document.getElementById("outdate").style.display = "block"; document.getElementById("outime").innerHTML = daysold; |