diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-07 01:12:54 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-07 01:12:54 -0500 |
commit | 7e138622129c96a634b41f99dc552015cbe4b5a6 (patch) | |
tree | 8975468b8f3a91edb24880150297d52805ec93f8 /lib/page_local.rb | |
parent | 90a45f9729f131569889f52cf792007f23df3949 (diff) |
Consistently use Time (rather than Date or DateTime).
Diffstat (limited to 'lib/page_local.rb')
-rw-r--r-- | lib/page_local.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/page_local.rb b/lib/page_local.rb index ad4e970..7846a3b 100644 --- a/lib/page_local.rb +++ b/lib/page_local.rb @@ -69,13 +69,13 @@ class LocalPage < Page end def _gitdates - @gitdates ||= `git log --format='%cI' -- #{local_infile}`.split("\n").select{|s|!s.empty?}.map{|s|DateTime::iso8601(s)} + @gitdates ||= `git log --format='%cI' -- #{local_infile}`.split("\n").select{|s|!s.empty?}.map{|s|DateTime::iso8601(s).to_time} end def page_published if @_published.nil? raw = _pandoc['published'] - @_published = Datetime::parse(raw) unless raw.nil? + @_published = DateTime::parse(raw).to_time unless raw.nil? end if @_published.nil? @_published = _gitdates.sort.first @@ -86,7 +86,7 @@ class LocalPage < Page def page_updated if @_updated.nil? raw = _pandoc['updated'] - @_updated = DateTime::parse(raw) unless raw.nil? + @_updated = DateTime::parse(raw).to_time unless raw.nil? end if @_updated.nil? @updated = _gitdates.sort.last |