Sha256: 49f6ba2e56903e147419ab59dda8bd0aaf00d3d09bb79ba83c134be0317ccb21
Contents?: true
Size: 745 Bytes
Versions: 1
Compression:
Stored size: 745 Bytes
Contents
require "isodoc" module IsoDoc module Rsd class Metadata < IsoDoc::Generic::Metadata def configuration Metanorma::Rsd.configuration end def version(isoxml, _out) super revdate = get[:revdate] set(:revdate_MMMddyyyy, MMMddyyyy(revdate)) end def MMMddyyyy(isodate) return nil if isodate.nil? arr = isodate.split("-") date = if arr.size == 1 and (/^\d+$/.match isodate) Date.new(*arr.map(&:to_i)).strftime("%Y") elsif arr.size == 2 Date.new(*arr.map(&:to_i)).strftime("%B %Y") else Date.parse(isodate).strftime("%B %d, %Y") end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
metanorma-rsd-1.4.5 | lib/isodoc/rsd/metadata.rb |