#161 √ invalid
Jason (crash2burn)

Added to_format to Date, DateTime, and Time

Reported by Jason (crash2burn) | September 7th, 2008 @ 12:01 AM

This is a simple core extension to allow a "to_format" method be called on Date, DateTime, or Time objects. You pass in a symbol that corresponds to a key in Merb::Helpers::DateAndTime::date_formats and it will output your date in that format. I am not sure how needed this is.. but figured it might be useful. It is similar to rails' to_s(:format) extension, but much simpler and I did not want to add any execution time to .to_s, so i separated it out into its own method.

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

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

Shared Ticket Bins