"MY CALENDAR" Plug in - Date format

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
MidNiteRaver
Regular
Posts: 28
Joined: Fri Jan 21, 2005 6:52 am
Location: Caribbean
Contact:

"MY CALENDAR" Plug in - Date format

Post by MidNiteRaver »

Is there any EASY way for the date format to be changed from number only to 12-Aug-2006 or 12 Aug 06?

The WWW is visited by many people from different countries with different date format. The above however is clear to all as opposed to 2/3/06. Is that the 2nd March or 3rd Feb?

:D
Last edited by MidNiteRaver on Sun Jul 23, 2006 2:33 am, edited 2 times in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: My Calendar Plug in - Date format

Post by garvinhicking »

Hi!

There are two possibilities. Either you edit your template's "entries.tpl" file and replace "DATE_FORMAT_ENTRY" and "DATE_FORMAT_SHORT" to the correpspondig PHP strftime() commands, like:

"%d-%B-%Y" (or others).

The other possibility is to edit your language file in lang/ and replace the value of the DATE_FORMAT_ENTRY / _SHORT constants there.

Best 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/
MidNiteRaver
Regular
Posts: 28
Joined: Fri Jan 21, 2005 6:52 am
Location: Caribbean
Contact:

Solution to my date format problem for MY CALENDAR PLUGIN

Post by MidNiteRaver »

I am a simple man and found a simple answer, that I should have seem before. I went into Administration, clicked on Configure Plugins, then on "My Calendar" Sidebar Plugin. There under "Dateformatting" I changed %d.%m.%Y to %d %b %Y changing the month (%m) from digital to month (%b) abbreviated month name. I also removed the dots (.) from between the format.

Great I am a wiser man now :D .

Could I be bold enough to suggest that the default format in the plug in be changed to a more international format such as the one I have changed to?

Thanks again for the guidance.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Solution to my date format problem for MY CALENDAR PLUGI

Post by garvinhicking »

Hi!

Hm, sadly this format is the one that is about the only one really acquired in germany, and as it stands germany seems to be the current center of s9y activity...

Sadly we have no general very short date format in the language constants, so we can't use a format that is language specific there....hrm, this is problematic. Several users might feel strange if the format changes in a new plugin version, so I'd like to keep existing users happy and would like new users to adapt to their own liked dateformat instead? *G*

Best 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