macana

Static site generator for Obsidian Vault

Improve create/update datetime formatting, more concise and consistent This patch reduces clutters in a datetime string and make the string more consistent to other parts of the document. The first and most significant problem was the datetime string is formatted using UA's locale. The UA's locale could be different to a document's locale. This results in inconsistent text formatting: for example, when a user viewing the page with `lang="ja"` but UA uses "en-US", chunk of "en-US" text appears in "ja" document as a result. The second problem is the datetime string is verbose. I can't imagine any usecase where seconds part benefits a user (viewer). The final problem is ugliness of the datetime string in noscript env. It's ISO-8601 string because of timezone. I remembered that `toLocaleString` (`Intl.DateTimeFormat`) can display timezone string, so here it is. Even though the metadata is not properly styled and is still ugly, I'm satisfied how the result looks good without compromising semantic markup and/or build process.

Changes

4 changed files (+29/-10)