Testing the 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.

  1. Basic (the default output, based on the format specified in the preferences settings): 19 October 2021, 03:51 pm and using the calendar attribute: October 19, 3 Reiwa, 03:51 pm or shorthand1 (%x) October 19, 3 Reiwa and the modified date: May 18, 4 Reiwa
  2. Basic, localised to Japanese: 令和3年10月19日, 03:51 午後 or shorthand 令和3年10月19日 and modified date: 令和4年5月18日
  3. manual build, localised: posted 3年10月19日(火) and modified 4年5月18日(水)
  4. manual build, system (English)23: posted 3/10/19 (Tue) and modified 4/05/18 (Wed)

Testing other formats and languages:

  1. Site language, 03-10-19 and Japanese: 03-10-19 (the %F format does not appear to localise, perhaps not unexpected).
  2. Date and time format: October 19, 3 Reiwa at 3:51 pm and 令和3年10月19日 15:51 (using format='%c').
  3. Using the Persian calendar: 27 Mehr 1400 AP or ۲۷ مهر ۱۴۰۰

notes

  1. a The date and time format (<txp:posted calendar='japanese' format='%X' /> ) does not seem to work, only time is outputted (2021-08-12) This was a misunderstanding on my part. The %X only sets the time shorthand, for both date and time together, use %c.
  2. 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
  3. 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.