diff --git a/src/plugins/lib/libsubstkeyword.py b/src/plugins/lib/libsubstkeyword.py index 26c5dedc9..5c91c7674 100644 --- a/src/plugins/lib/libsubstkeyword.py +++ b/src/plugins/lib/libsubstkeyword.py @@ -231,7 +231,8 @@ class DateFormat(GenericFormat): else: #count == 4 #found 'yyyy' tmp = "000" + year return tmp[-4:] - + + def month(char_found = "m"): """ The month part only """ month = unicode(date.get_month()) @@ -265,11 +266,21 @@ class DateFormat(GenericFormat): else: #found 'dd' tmp = "0" + day return tmp[-2:] + + + def modifier(): + print "hi" + ui_mods = [_(""), _("before"), _("after"), _("about"), + _(""), _(""), _("")] + return ui_mods[date.get_modifier()].capitalize() + + def modifier_up(): + return modifier.upper() + - - code = "ymdM" + code = "ymdMoO" upper = "" - function = [year, month, day, month_up] + function = [year, month, day, month_up, modifier, modifier_up] return self.generic_format(date, code, upper, function) @@ -1447,4 +1458,4 @@ if __name__ == '__main__': 34, 35, 38, 39, 38, 33, 32, 33, 36, 37, 36, 40, 41, 40, 44, 33, 32, 33, 36, 37, 36, 40, 41, 40, 44, 38, 39, 38, 42, 46] else "!! bad !!" - \ No newline at end of file +