Sha256: f85e1c605c65a866bbba1cab6dcc52bc94b9f3e688055e89e680acf0e47195c8

Contents?: true

Size: 1015 Bytes

Versions: 14

Compression:

Stored size: 1015 Bytes

Contents

# HTML writer
# date

# History:
# 	Stan Smith 2015-03-23 original script

module ADIWG
   module Mdtranslator
      module Writers
         module Simple_html

            class Html_Date

               def initialize(html)
                  @html = html
               end

               def writeHtml(hDate)

                  date = hDate[:date]
                  dateRes = hDate[:dateResolution]
                  dateStr = ''

                  unless date.nil?
                     case dateRes
                        when 'Y', 'YM', 'YMD'
                           dateStr = AdiwgDateTimeFun.stringDateFromDateTime(date, dateRes)
                        else
                           dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(date, dateRes)
                     end
                  end

                  # datetime - required
                  @html.text!(hDate[:dateType] + ': ' + dateStr)

               end # writeHtml
            end # Html_Date

         end
      end
   end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.31 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb