diff options
Diffstat (limited to 'trivium.rb')
-rw-r--r-- | trivium.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/trivium.rb b/trivium.rb index 2470a00..a3e740b 100644 --- a/trivium.rb +++ b/trivium.rb @@ -20,6 +20,7 @@ def parse(f) entry = {:body => body, :id => File.basename(f, ".entry"), :file => f} head.scan(/(\w+): *(.*)/) { entry[$1.downcase.to_sym] = $2 } entry[:date] = Time.parse(entry[:date]) if entry[:date] + entry[:updated] = entry[:updated] ? Time.parse(entry[:updated]) : entry[:date] entry[:title] = entry[:date].strftime("%d%b%Y").downcase if entry[:date] entry end |