diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-03 17:54:38 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-03 17:54:38 -0500 |
commit | 187d7b62a666d2d63bea742b1b255f998a850f7b (patch) | |
tree | 34076b772d54d61316e2a482b24c61b3026a5d76 /bin | |
parent | 8c710d158941e7ba95f56253552164949aa764c6 (diff) |
Fix weirdness with dates.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/util.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/util.rb b/bin/util.rb index 6ea3967..16c7212 100644 --- a/bin/util.rb +++ b/bin/util.rb @@ -128,7 +128,9 @@ class Page if @published.nil? raw = `git log -n1 --reverse --format='%cI' -- #{infile}` @published = DateTime.iso8601(raw) unless raw.empty? - if !updated.nil? && updated < @published + end + unless @published.nil? or updated.nil? + if updated < @published @published = updated end end |