Dates in 2k11

Creating and modifying plugins.
Post Reply
Fabien
Regular
Posts: 204
Joined: Wed Mar 15, 2006 1:02 pm
Location: Paris (France)
Contact:

Dates in 2k11

Post by Fabien »

Hi,

It seems that 2k11 doesn't use the format of date defined in "lang/UTF-8/serendipity_lang_fr.inc.php". Where can I modify the format of date?

Thanks,
Fabien
Fabien Chabreuil (blog)
onli
Regular
Posts: 2822
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Dates in 2k11

Post by onli »

Hi, there should be a configuration option in the theme configuration. In the backend area under Themes, below the active one.
Fabien
Regular
Posts: 204
Joined: Wed Mar 15, 2006 1:02 pm
Location: Paris (France)
Contact:

Re: Dates in 2k11

Post by Fabien »

Thanks for your answer.

Yes but it works for comments not for entries.
I use %A %e %B 0%Y
You can see on the mainpage of the blog : entries left and comments right : http://www.chabreuil.com/Aurore/
Fabien Chabreuil (blog)
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Dates in 2k11

Post by yellowled »

I'm a bit confused as to what is your issue here. The date format you want to use is supported by 2k11, so you should be able to select it in the theme options (don't forget to save, maybe clear template cache). However, that will only be used in places in 2k11's tpl file where the backend date format is used, not in the comments in the sidebar. To change those, you would need to change the date format used by the sidebar plugin (if that's possible).

YL
Fabien
Regular
Posts: 204
Joined: Wed Mar 15, 2006 1:02 pm
Location: Paris (France)
Contact:

Re: Dates in 2k11

Post by Fabien »

Thank you for your answer.

I used the date format listed in my previous message and of course, O havd cleared the cache. But the format is not applied to the entries.

I have set the same format in s9y lang file and sidebar plugin. Its probably the reason of the correct formating in comments and sidebar.

Best regards
Fabien
Fabien Chabreuil (blog)
Fabien
Regular
Posts: 204
Joined: Wed Mar 15, 2006 1:02 pm
Location: Paris (France)
Contact:

Re: Dates in 2k11

Post by Fabien »

Does the problem comes from the fact that I want to use a non standard format :
%A %e %B 0%Y

If yes, is there a bypass?
Fabien Chabreuil (blog)
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Dates in 2k11

Post by yellowled »

Fabien wrote: Sat Oct 12, 2019 5:36 pmDoes the problem comes from the fact that I want to use a non standard format: %A %e %B 0%Y
Ah, so you have overridden DATE_FORMAT_ENTRY in your lang/serendipity_lang_fr.inc.php? If so, did you do that as well in lang/UTF-8/serendipity_lang_fr.inc.php?

If you changed it in both files, what is the first option you get in the date format dropdown in 2k11's theme options? Because that one should be whatever is your DATE_FORMAT_ENTRY. (I'm not sure if using the 0 is an issue, but since you can use i.e. a comma in the date string … does it work if you use 0 %Y instead of 0%Y?)

YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Dates in 2k11

Post by yellowled »

Erm, looking at your blog, the 0 doesn't even seem to be the problem because that is actually emitted in entries and in the sidebar … :?

Here's the thing: I don't understand French well. But as far as I can see, the format you want is

Full name of the weekday (le Mardi)
day of the month, no leading zero (24)
name of the month (février)
a „0“ followed by the four digit year (02003)

So the date format used in your entries by 2k11 is what you want (unless I misunderstand you completely, which is entirely possible). It is also used for comments in entries. It however, is not in the comments sidebar plugin (sam. 12 oct. 02019, 08:57 => %a %e %b 0%Y), which suggests that either you have not set it to the same format in the sidebar plugin or that the plugin is bugged.

YL
Fabien
Regular
Posts: 204
Joined: Wed Mar 15, 2006 1:02 pm
Location: Paris (France)
Contact:

Re: Dates in 2k11

Post by Fabien »

Thank you for you information and advices. Everything is OK now.
Fabien Chabreuil (blog)
Fabien
Regular
Posts: 204
Joined: Wed Mar 15, 2006 1:02 pm
Location: Paris (France)
Contact:

Re: Dates in 2k11

Post by Fabien »

Sorry, this post was not for this discussion : erased ***
Fabien Chabreuil (blog)
Post Reply