summary refs log tree commit diff
path: root/_layouts/post.html
diff options
context:
space:
mode:
authormayx2025-05-11 16:50:47 +0000
committermayx2025-05-11 16:50:47 +0000
commitde996d9015d603cf7ddb417c2adca17cb78f707d (patch)
tree39bdfb3330075932a86dac72af16d330b92b5f7e /_layouts/post.html
parentdbc8d7fb3cb30133ede3b1a9e8135e15c200046b (diff)
Update 3 files
- /assets/js/main.js
- /_layouts/default.html
- /_layouts/post.html
Diffstat (limited to '_layouts/post.html')
-rw-r--r--_layouts/post.html7
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;