PageSourceSearch

https://paper.wf/js/localdate.js

js paper.wf collected 2026-09-24 08:57:12 UTC 697 bytes, 16 lines download raw bytes

1function toLocalDate(dateEl, displayEl) {
2	var d = new Date(dateEl.getAttribute("datetime"));
3	displayEl.textContent = d.toLocaleDateString(navigator.language || "en-US", { year: 'numeric', month: 'long', day: 'numeric' });
4}
5
6// Adjust dates on individual post pages, and on posts in a list *with* an explicit title
7var $dates = document.querySelectorAll("article > time");
8for (var i=0; i < $dates.length; i++) {
9	toLocalDate($dates[i], $dates[i]);
10}
11
12// Adjust dates on posts in a list without an explicit title, where they act as the header
13$dates = document.querySelectorAll("h2.post-title > time");
14for (i=0; i < $dates.length; i++) {
15	toLocalDate($dates[i], $dates[i].querySelector('a'));
16}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.