mirror of
https://github.com/jimeh/redistat.git
synced 2026-02-19 05:16:39 +00:00
Redistat::Date can now take the output from it's
own #to_s method as input.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user