On 21 Oct 2008, at 22:21, Nicktabs wrote: > There are a few topics on here that relate to my problem but none are > helping as i'm new to this and there are lots of confusing posts on > google. > > I need to chage the way dates are input and displayed in my app. This > is for a european app so the dates need to work as DD/MM/YYYY not the > America way. > > Now I don't mind keeping the datbase in the orginal Date format as I > won't be accessing it directly however I guess I need to wrtite > something in my model to change the way the dates are done?
Showing them in European date format is easy, almost every localization plugin out there provides it in some way and you can do it yourself quite easily too. Input is a totally different matter, as far as I know there is no transparent way to make Rails process European date and number formats from input fields. I've implemented a few hacky solutions in the past, like using method_missing or generating a number of new methods to convert one format to the other, but in the end it doesn't feel right at all. There have been some discussions in the Rails i8n group about it, but those also seem to have died a silent death and localization in the next version is very basic (but easier to plugin on, although I still have serious doubts about date and number formats, since those would require quite some changes in the fundations of the framework). I hope someone of the i8n people will chime in on this post and be able to tell you what to expect, I might be wrong in what I said (so hung up in a project I haven't been able to follow the discussion). Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

