summary refs log tree commit diff
path: root/trivium.rb
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2008-10-01 15:22:45 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2008-10-01 15:22:45 +0200
commit83afeae4d726fe1a9337623e4aafcb2c8eff1432 (patch)
tree183bf6e8373af354dc8f84235a2c11fe42070067 /trivium.rb
parent8a97ddf397d9a2678963d39f7ede3df8ae796ce1 (diff)
downloadtrivium-83afeae4d726fe1a9337623e4aafcb2c8eff1432.tar.gz
trivium-83afeae4d726fe1a9337623e4aafcb2c8eff1432.tar.xz
trivium-83afeae4d726fe1a9337623e4aafcb2c8eff1432.zip
Fix Atom updated/published semantics
Diffstat (limited to 'trivium.rb')
-rw-r--r--trivium.rb1
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