Module: TomlRB::LocalDateTimeParser
- Defined in:
- lib/toml-rb/datetime.rb
Instance Method Summary collapse
Instance Method Details
#value ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/toml-rb/datetime.rb', line 14 def value year, mon, day = captures[:date_skeleton].first.value hour, min, sec, sec_frac = captures[:time_skeleton].first.value usec = sec_frac.to_s.ljust(6, "0") Time.local(year, mon, day, hour, min, sec, usec) end |