#19 ✓resolved
Matt Todd

JSON DateTime Parsing Helpers

Reported by Matt Todd | March 26th, 2008 @ 10:01 PM | in Release 0.5.0

There should be a way to handle parsing a variety of Date/Time formats (strings) into actual Date/Time objects, and also a way to generate these formats (possibly allowing for customization).

For example:

Time.now.to_s(:json) #=> "2008-03-26 11:56:32 -0500"
Time.now.to_s(:json, :utc) #=> "2008-03-27T16:56:58Z"
"2008-03-27T16:56:58Z".to_date(:json) #=> #<Date:0x12a2d20>

Consider this for contribution to the Merb framework as well.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Pages