From e87033fc367c0a99ab9316cb480d2886b3c57cdc Mon Sep 17 00:00:00 2001 From: Johnathan Aspinwall Date: Fri, 24 May 2024 09:42:57 -0600 Subject: [PATCH] chore: Update adiwg-mdtranslator gem dependency to version 2.19.0.pre.beta.22 --- Gemfile.lock | 2 +- lib/adiwg/mdtranslator/version.rb | 2 +- .../writers/iso19115_3/classes/class_gcoDateTime.rb | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0d986a803..c5df5d5df 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - adiwg-mdtranslator (2.19.0.pre.beta.21) + adiwg-mdtranslator (2.19.0.pre.beta.22) adiwg-mdcodes (= 2.9.4.pre.beta.4) adiwg-mdjson_schemas (= 2.9.3.pre.beta.3) builder (~> 3.2) diff --git a/lib/adiwg/mdtranslator/version.rb b/lib/adiwg/mdtranslator/version.rb index 1b6435b36..f3d5ae9fb 100644 --- a/lib/adiwg/mdtranslator/version.rb +++ b/lib/adiwg/mdtranslator/version.rb @@ -109,7 +109,7 @@ module ADIWG module Mdtranslator # current mdtranslator version - VERSION = "2.19.0-beta.21" + VERSION = "2.19.0-beta.22" end end diff --git a/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_gcoDateTime.rb b/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_gcoDateTime.rb index 5c7d87533..e408a5f0e 100644 --- a/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_gcoDateTime.rb +++ b/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_gcoDateTime.rb @@ -24,7 +24,16 @@ def writeXML(hDate) # date - date (required) unless date.nil? case dateRes - when 'Y', 'YM', 'YMD', 'YMDh', 'YMDhm', 'YMDhms' + when 'Y' + dateStr = AdiwgDateTimeFun.stringDateFromDateTime(date, 'Y') + @xml.tag!('gco:Date', dateStr) + when 'YM' + dateStr = AdiwgDateTimeFun.stringDateFromDateTime(date, 'YM') + @xml.tag!('gco:Date', dateStr) + when 'YMD' + dateStr = AdiwgDateTimeFun.stringDateFromDateTime(date, 'YMD') + @xml.tag!('gco:Date', dateStr) + when 'YMDh', 'YMDhm', 'YMDhms' dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(date, 'YMDhms') @xml.tag!('gco:DateTime', dateStr) when 'YMDhZ', 'YMDhmZ', 'YMDhmsZ'