Sha256: ef12c68a739b98b16adce56333e9aefd167bb877f33c71b1c0c2e82643251938
Contents?: true
Size: 1.54 KB
Versions: 66
Compression:
Stored size: 1.54 KB
Contents
# ISO <<Class>> Date, DateTime # 19115-2 writer output in XML # History: # Stan Smith 2017-02-10 original script module ADIWG module Mdtranslator module Writers module Iso19115_2 class GcoDateTime def initialize(xml, hResponseObj) @xml = xml @hResponseObj = hResponseObj end def writeXML(hDate) date = hDate[:date] dateRes = hDate[:dateResolution] # date - date (required) unless date.nil? case dateRes when 'Y', 'YM', 'YMD' dateStr = AdiwgDateTimeFun.stringDateFromDateTime(date, dateRes) @xml.tag!('gco:Date', dateStr) when 'YMDh', 'YMDhm', 'YMDhms' dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(date, 'YMDhms') @xml.tag!('gco:DateTime', dateStr) when 'YMDhZ', 'YMDhmZ', 'YMDhmsZ' dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(date, 'YMDhmsZ') @xml.tag!('gco:DateTime', dateStr) else dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(date, dateRes) @xml.tag!('gco:DateTime', dateStr) end end end # write XML end # Date class end end end end
Version data entries
66 entries across 66 versions & 1 rubygems