bokmann/business_time — pull request #42 by danlo (2013-08-13 05:13:47+00:00)
Title: Removed to_s, which can depend on user modifying the default format.

A cleaver user on my system changed the default date format, which created all sorts of bad parsing problems. A 2 digit year, yielding a millenium bug!!! 13 years after the fact...

formats = {
default: "%b-%d-%y %I:%M %p"
}
Time::DATE_FORMATS.merge!(formats)

Time.parse, converts the %y to 0013... which was quite a surpize.

The new code uses strftime to specify the exact format to be parsed, instead of leaving it as a default.

All tests pass.

Thank you!