Re: [Rails] Normalize dates taht are entered in more then one way.
On 18 July 2013 15:35, Mark Kenney <markkenney22@gmail.com> wrote:
> Hi all,
>
> I'm looking for a function, gem, etc. that will help to unify dates as they
> come in different formats. If the date comes in
> (1/2/2012,2012-01-02,01-02-2012,20120102,01022012, etc.) it would be nice to
> have it come out 2012-01-02. I've searched for a few days and only find ways
> to convert this format to that format. I might be using the wrong search
> terms and this may have already been addressed, if so, I apologize. In my
> previous PERL app I wrote a long If Else type converter that would test the
> date and then convert it in a specific order but I'm sure someone has solved
> it better then I could.
Where are the dates coming from?
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLunoai0WfE9%2BZQj6bfwNdOVJCO14jAP1guXg-ZTCw%2BEcg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home