Dateformat
-
- Posts: 55
- Joined: Fri Jan 29, 2016 7:20 am
Dateformat
Isn't it possible to define how you want the timestamp to be formatted any longer?
Re: Dateformat
That is still possible as in older versions ($tx['lastupdate']['dateformat']), unless the Intl extension is available (check Settings → Info → PHP info), in which case you have to do it in the configuration (Settings → Configuration → Format → Date / Time).lillebitte wrote:Isn't it possible to define how you want the timestamp to be formatted any longer?
Christoph M. Becker – Plugins for CMSimple_XH
-
- Posts: 55
- Joined: Fri Jan 29, 2016 7:20 am
Re: Dateformat
No, Settings → Configuration → Format → Date / Time does not allow me to define how I want the format. First of all I do not want an English format, and I do not seem to even be able to get rid of that?
Edit:
I have tried to set Dateformat to "j. n Y, H:i" in Settings → Language → Lastupdate - Dateformat, and I get January 7, 2018 at 1:06 AM
Edit:
I have tried to set Dateformat to "j. n Y, H:i" in Settings → Language → Lastupdate - Dateformat, and I get January 7, 2018 at 1:06 AM
Re: Dateformat
Apparently, the Intl extension is available on your server. To get Danish dates, you have to change Settings → Language → Locale → All to "da_DK".lillebitte wrote:No, Settings → Configuration → Format → Date / Time does not allow me to define how I want the format. First of all I do not want an English format, and I do not seem to even be able to get rid of that?
Edit:
I have tried to set Dateformat to "j. n Y, H:i" in Settings → Language → Lastupdate - Dateformat, and I get January 7, 2018 at 1:06 AM
If you still don't like the format, you can change this line to:
Code: Select all
if (false) {
Christoph M. Becker – Plugins for CMSimple_XH
-
- Posts: 55
- Joined: Fri Jan 29, 2016 7:20 am
Re: Dateformat
That's better. Thank you very much!
-
- Posts: 55
- Joined: Fri Jan 29, 2016 7:20 am
Re: Dateformat
I am afraid I still do not understand how to control the date format.
If I change the line 2567 in functions.php I am allowed to use the setting in Settings → Language → Lastupdate → Dateformat, but then I get English names for days and months, even with Settings → Language → Locale → All set to "da_DK".
If I change the line 2567 in functions.php I am allowed to use the setting in Settings → Language → Lastupdate → Dateformat, but then I get English names for days and months, even with Settings → Language → Locale → All set to "da_DK".
Re: Dateformat
You will not be able to get other day or month names than the English ones – that's a limitation of date() which is used in your case – and always in versions before CMSimple_XH 1.7.0.lillebitte wrote:I am afraid I still do not understand how to control the date format.
If I change the line 2567 in functions.php I am allowed to use the setting in Settings → Language → Lastupdate → Dateformat, but then I get English names for days and months, even with Settings → Language → Locale → All set to "da_DK".
Therefore the new mode based on the Intl extension has been introduced.
Christoph M. Becker – Plugins for CMSimple_XH
-
- Posts: 55
- Joined: Fri Jan 29, 2016 7:20 am
Re: Dateformat
Hm, ok, thanks. At least I got rid of the English names, and that was good!
Re: Dateformat
ACK. It would be possible to allow custom formats, but that looks rather complicated. Not sure, if it's worth the trouble. On the other hand, I'm somewhat confused that the short date format for da_DK is something like "06/01/2018", which appears to be rather uncommon.lillebitte wrote:Hm, ok, thanks. At least I got rid of the English names, and that was good!
Christoph M. Becker – Plugins for CMSimple_XH
-
- Posts: 55
- Joined: Fri Jan 29, 2016 7:20 am
Re: Dateformat
Sorry, I have not been aware of your answer until now.
Actually I have used 1/1-18, but that's no big deal, and 01.01.2018 or 01-01-2018 is more common, especially now a days.
So now I'm just curious, what is Settings → Language → Lastupdate → Dateformat used for?
Actually I have used 1/1-18, but that's no big deal, and 01.01.2018 or 01-01-2018 is more common, especially now a days.
So now I'm just curious, what is Settings → Language → Lastupdate → Dateformat used for?