Sha256: 398c7d161f6a03d88168bf5917a4d265a72069de6e3b2adc2aab69fd31a4cf14
Contents?: true
Size: 402 Bytes
Versions: 2
Compression:
Stored size: 402 Bytes
Contents
module ECFS module Util def format_iso_date(date) # input format 12/22/1988 chunks = date.split("/") new_date = "#{chunks[2]}-#{chunks[0]}-#{chunks[1]}" # "22-12-1988" "#{new_date}T00:00:00.000Z" # dumb hack end def iso_date_to_simple_date(iso_date) chunks = iso_date.split("T")[0].split("-") "#{chunks[1]}-#{chunks[0]}-#{chunks[2]}" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ecfs-0.2.2 | lib/ecfs/util.rb |
ecfs-0.2.1 | lib/ecfs/util.rb |