# HG changeset patch # User jbe # Date 1352001294 -3600 # Node ID fd31e0aa629a9f35c43ce7e210cedb5dea9fafca # Parent 290b6b10b1608969f19760f407298961be65ed43 Bugfix in format.time(...) diff -r 290b6b10b160 -r fd31e0aa629a framework/env/format/time.lua --- a/framework/env/format/time.lua Fri Oct 19 19:21:49 2012 +0200 +++ b/framework/env/format/time.lua Sun Nov 04 04:54:54 2012 +0100 @@ -29,12 +29,12 @@ if options.hide_seconds then result = string.gsub(result, "{[^{|}]*}", "") else - result = string.gsub(result, "{([^|]*)}", "%1") + result = string.gsub(result, "{([^{|}]*)}", "%1") end local am_pm local hour = value.hour - result = string.gsub(result, "{([^{}]*)|([^{}]*)}", function(am, pm) - if hour > 12 then + result = string.gsub(result, "{([^{|}]*)|([^{|}]*)}", function(am, pm) + if hour >= 12 then am_pm = pm else am_pm = am