calendar attribute for dates (available with the –at writing time upcoming– Textpattern 4.8.8 for the
date related tags, this allows displaying dates with Japanese era names, or the Persian or Arabic calendar format among others.
- Basic (the default output, based on the format specified in the preferences settings): 19 October 2021, 03:51 pm and using the
calendarattribute: October 19, 3 Reiwa, 03:51 pm or shorthand1 (
%x) October 19, 3 Reiwa and the modified date: May 18, 4 Reiwa
- Basic, localised to Japanese: 令和3年10月19日, 03:51 午後 or shorthand 令和3年10月19日 and modified date: 令和4年5月18日
- manual build, localised: posted 3年10月19日（火） and modified 4年5月18日（水）
- manual build, system (English)23: posted 3/10/19 (Tue) and modified 4/05/18 (Wed)
Testing other formats and languages:
- Site language, 03-10-19 and Japanese: 03-10-19 (the
%Fformat does not appear to localise, perhaps not unexpected).
- Date and time format: October 19, 3 Reiwa at 3:51 pm and 令和3年10月19日 15:51 (using
- Using the Persian calendar: 27 Mehr 1400 AP or ۲۷ مهر ۱۴۰۰
The date and time format (This was a misunderstanding on my part. The
<txp:posted calendar='japanese' format='%X' />) does not seem to work, only time is outputted (2021-08-12)
%Xonly sets the time shorthand, for both date and time together, use
- a A slightly different syntax is used for non-localised date-stamp: for Japanese I use
format='%y年%b%e日 (%a)and for English:
format='%Y/%m/%e (%a)'. That way it makes grammatical and logical sense in either language
- a Ideally, for disambiguation purposes, and both for Japanese localised and English, the era name in one character notation need to be added manually as a prefix to the string. “S” for Shōwa (昭), “H” for Heisei (平), “R” for Reiwa (令) and so on.