Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[RFC] Calendars support?
The (likely) deprecation of strftime()
function in PHP 8.1 makes us search for a replacement. The natural date()
candidate does not support non-English languages. We are currently testing IntlDateFormatter
class that looks promising. As a by-product, introducing non-Gregorian calendars seems possible, though requires some work. Is it worth doing? Please comment.
Meanwhile, if you can test 4.8.8 for various date-related features, it would be ace. Thanks!
Offline
Re: [RFC] Calendars support?
etc wrote #331249:
Meanwhile, if you can test 4.8.8 for various date-related features, it would be ace. Thanks!
At first sight and very very basic look, things look alright in my 4.8-dev
playground. Not everything you have landed there has been added to the 4.9-dev
codebase, right ? (as mentioned before, that playground has much more “things” ready to use or verify). BTW thanks to adding UTC
as a time zone.
Regarding those other calendars, that would certainly a nice addition. Probably a less urgent task. The Persian calendar, or dates based on the Japanese Imperial era names, or the more ancient Chinese era names. The latter ones is more of interest for history oriented sites. The Japanese era naming/dating is actively used, e.g. in administrative documents. One can dream a little…
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: [RFC] Calendars support?
etc wrote #331249:
Meanwhile, if you can test 4.8.8 for various date-related features, it would be ace. Thanks!
I keep coming back to the idea that us doing a 4.8.8 beta (with appropriate fanfare) might be a smart idea. I know it’s new territory for a patch release, but then we’ve never been especially rigid in only putting patches into patch releases, so…
Offline
Re: [RFC] Calendars support?
gaekwad wrote #331256:
I keep coming back to the idea that us doing a 4.8.8 beta
Given how there are some fairly serious changes for PHP 8.1 compatibility, it is probably a good idea…
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: [RFC] Calendars support?
If it’s not too much hassle, then I think different calendars would be a real boon. Kjeld would love us :)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: [RFC] Calendars support?
Bloke wrote #331258:
If it’s not too much hassle…
It is, with or without calendars. Realistically, in 4.8.8 we could add calendar
attribute to date tags (e.g. <txp:posted calendar="persian" />
), but keep dates input Gregorian atm. If there is a real need for other calendars dates input, we could see later.
Offline
Re: [RFC] Calendars support?
etc wrote #331259:
It is, with or without calendars.
Forgive me…it is not too much hassle, or it is too much hassle – I’m easily confused.
Offline
Re: [RFC] Calendars support?
etc wrote #331259:
Realistically, in 4.8.8 we could add
calendar
attribute to date tags (e.g.<txp:posted calendar="persian" />
), but keep dates input Gregorian atm. If there is a real need for other calendars dates input, we could see later.
+1. This seems eminently reasonable. Is there a standard (ISO?) for the various calendar names? I’m looking at the moment, but nothing has turned up yet.
Offline
Offline
Re: [RFC] Calendars support?
etc wrote #331262:
Here we go.
Or the more recent version, here
(I think we were both looking for the same at the same time, you were faster in posting…)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Offline
Offline