Sha256: de73e26992c59da11640cb3f0e24e362e4daf03ac0a3689de84d9379d148759c
Contents?: true
Size: 409 Bytes
Versions: 31
Compression:
Stored size: 409 Bytes
Contents
module Krikri::Util module ExtendedDateParser ## # e.g. 1990s or 199- or 199x def decade(str) decade end ## # e.g. 1990s def decade_s(str) /^(\d{3})0s$/.match(str) do |m| Date.edtf("#{m[1]}x") end end ## # e.g. 199- def decade_hyphen(str) /^(\d{3})-$/.match(str) do |m| Date.edtf("#{m[1]}x") end end end end
Version data entries
31 entries across 31 versions & 1 rubygems