Date formatting

Permalink 1 user found helpful
Hi,

How are people here handling date formatting? Do you just hack the php-code or is there a better way? I understood that you could re-define some of the date formatting strings found in app.php in site.php but that doesn't seem to work. I get an error saying that constant is already defined.

And this solution leaves month and week names in english anyway so it's not really working. Or is there some php-configuration affecting this?

Currently I'm patching some of the things I need to use strftime() instead of date() which gives better results. Can I submit these patches somewhere and is there a change that these patches could be accepted to the official build?

Is there even a change that the Concrete5 date-system could move away from date() and start using strftime() instead? I think something like this is needed if you're going to take internationalization seriously. Now localization support is somewhat lacking. Date formatting is one thing and not all blocks support gettext for all strings. This only leads to frustration at least with me.

I'm patching at least page_list blocks blog_index-template and date_navs view.php to use strftime() and fixing the gettext-support.

I can post my patches here when I'm done if someones interested. Or are there patches or custom templates for this already available?

Hmm... I'm sorry for the rant-like qualities of this post. I think Concrete5 is an excellent software even if localization support is still a bit immature.