Modifying date

Discussion corner for Developers of Serendipity.
Post Reply
pierre
Regular
Posts: 11
Joined: Thu Sep 22, 2005 2:10 am
Location: France
Contact:

Modifying date

Post by pierre »

How to modify the date, I mean for instance I just want the day and hour not year, and how to localize the calendar ?
Thx for your job
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Modifying date

Post by garvinhicking »

Either edit the language constant strings in your lang/serendipity_lang_fr.inc.php file, or edit the *.tpl files of your template to change the date format function.

Like in the default entries.tpl you can find this:

Code: Select all

{$dategroup.date|@formatTime:DATE_FORMAT_ENTRY}
You can change this to:

Code: Select all

{$dategroup.date|@formatTime:'%H:%i'}
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
pierre
Regular
Posts: 11
Joined: Thu Sep 22, 2005 2:10 am
Location: France
Contact:

ok, but...

Post by pierre »

I've seen the format in the _lan_fr file, thx it works.

But despite the fact I HAVE fr language taken in account by S9Y, the plugin calendar don't work in fr, still in en_EN ...

What have I missed ?
Thx for your job
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: ok, but...

Post by garvinhicking »

If the calendar dates are in english, your server does not have the french locale installed. You need to check with your server admin and ask him to install either one of the locales mentioned in the DATE_LOCALES constant of your language file.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply