Redistat::Date can now take the output from it's

own #to_s method as input.
This commit is contained in:
2010-11-07 22:30:01 +00:00
parent 83b2b5b528
commit b6ceabf8b3
2 changed files with 9 additions and 0 deletions

View File

@@ -78,6 +78,7 @@ module Redistat
end
def from_string(input)
input += "19700101000000"[input.size..-1] if input =~ /^\d\d\d[\d]+$/i
from_time(::Time.parse(input))
end