Sha256: 0aee3d48a5a2d3989faaf17e078a0422f440de5b6bd99da9ca3f3ed55c46e082
Contents?: true
Size: 1.36 KB
Versions: 8
Compression:
Stored size: 1.36 KB
Contents
# ISO <<Class>> Date, DateTime # 19115-3 writer output in XML # History: # Stan Smith 2019-03-14 original script module ADIWG module Mdtranslator module Writers module Iso19115_3 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', '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
8 entries across 8 versions & 1 rubygems