only show date, not hours, show 'laast aangepast op' instead of geschreven op

This commit is contained in:
Jens Timmerman 2020-10-12 23:47:58 +02:00
parent fbc76e8f7d
commit 804c0b1038
2 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@
<% end %>
<div class="details animated fadeInRight">
<small>
Geschreven op <%= gitmtime %><br>
Laatst aangepast op <%= gitmtime %><br>
Leestijd: <%= reading_time @item %>
</small>
</div>

View file

@ -27,13 +27,13 @@ module BlogHelper
end
def gitmtime
# find file extension
# find file last modification time
filepath=@item[:content_filename]
str=`git log -1 --format='%ci' -- #{filepath}`
str=`git log -1 --format=%cd --date=short -- #{filepath}`
if str == ""
return @item[:created_at]
else
return DateTime.parse( str )
return str
end
end
end