module Fugit::Nat::Parser
def rewrite_nat(t)
def rewrite_nat(t) o.pp(t, colours: true) t .subgather(nil) .collect { |tt| k = tt.name v = tt.string.downcase case k when :tz [ k, [ tt.string.strip, EtOrbi.get_tzone(tt.string.strip) ] ] when :duration [ k, [ Fugit::Duration.parse(tt.string.strip) ] ] when :numeral_hour [ k, NUMS.index(v) ] when :simple_hour [ k, v.to_i ] when :digital_hour v = v.gsub(/:/, '') [ k, [ v[0, 2], v[2, 2] ] ] when :name_hour [ :digital_hour, NHOURS[v] ] when :name_day [ k, WEEKDAYS.index(v[0, 3]) ] else [ k, v ] end } end