summaryrefslogtreecommitdiff
path: root/_layouts
diff options
context:
space:
mode:
authormayx <mayx@outlook.com>2025-05-11 18:50:47 +0200
committermayx <mayx@outlook.com>2025-05-11 18:50:47 +0200
commitde996d9015d603cf7ddb417c2adca17cb78f707d (patch)
tree39bdfb3330075932a86dac72af16d330b92b5f7e /_layouts
parentdbc8d7fb3cb30133ede3b1a9e8135e15c200046b (diff)
Update 3 files
- /assets/js/main.js - /_layouts/default.html - /_layouts/post.html
Diffstat (limited to '_layouts')
-rw-r--r--_layouts/default.html2
-rw-r--r--_layouts/post.html7
2 files changed, 2 insertions, 7 deletions
diff --git a/_layouts/default.html b/_layouts/default.html
index db770f7..54fdaed 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -22,7 +22,7 @@
<script src="/assets/js/jquery.min.js"></script>
<script>
- var lastUpdated = new Date("{{ site.time | date_to_xmlschema }}");
+ var lastUpdated = new Date("{{ site.time | date_to_rfc822 }}");
var BlogAPI = "https://summary.mayx.eu.org";
</script>
<script src="/assets/js/main.js"></script>
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;