From 19797b659be5b03ccc5d9f4047308f1e4a2e122f Mon Sep 17 00:00:00 2001 From: Alasdair Colley Date: Tue, 1 Nov 2011 14:02:15 +0000 Subject: Fixed bug with custom events --- perc | 6 +++--- perc.cfg | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/perc b/perc index 1a953c4..b3b8d6b 100644 --- a/perc +++ b/perc @@ -69,7 +69,7 @@ WEEK_LENGTH = 7 WEEKEND = [ SATURDAY, SUNDAY ] WORK_WEEK = [ MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY ] -IMPORTANT_TEMPORAL_EVENTS = ["tomorrow", "friday", "new year", "newyear", "christmas", "xmas", "weekend", "midday", "noon", "tg", "intense", "lunch", "easter", "halloween"] +IMPORTANT_TEMPORAL_EVENTS = ["tomorrow", "friday", "new year", "newyear", "christmas", "xmas", "weekend", "midday", "noon", "lunch", "easter", "halloween"] OUTPUT_TYPES = ["perc", "bar", "ram", "pint"] @@ -341,8 +341,8 @@ def removeEvent(name): def parseUserArgs(args, user): start, finish, start_formatted, finish_formatted = user.start, user.finish, user.start.strftime(user.format), user.finish.strftime(user.format) - if args and isImportantTemporalEvent(args[0].lower()): - start, finish, start_formatted, finish_formatted = parseTemporalEvent(args[0].lower(), user) + if args and isImportantTemporalEvent(args[0]): + start, finish, start_formatted, finish_formatted = parseTemporalEvent(args[0], user) else: format = None times = args[0:2] diff --git a/perc.cfg b/perc.cfg index 454a9a8..2abf07e 100644 --- a/perc.cfg +++ b/perc.cfg @@ -5,8 +5,8 @@ "hyphens": "%Y-%m-%d" }, "time": { - "12hour": "%I:%M%p", "military": "%H%M", + "12hour": "%I:%M%p", "12houronly": "%I%p", "civilian": "%H:%M" } -- cgit v1.2.3