From 187d7b62a666d2d63bea742b1b255f998a850f7b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 3 Jan 2017 17:54:38 -0500 Subject: Fix weirdness with dates. --- bin/util.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin') 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 -- cgit v1.2.3