diff options
Diffstat (limited to 'poezio/ui/consts.py')
-rw-r--r-- | poezio/ui/consts.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/poezio/ui/consts.py b/poezio/ui/consts.py index 91f19a82..0838d953 100644 --- a/poezio/ui/consts.py +++ b/poezio/ui/consts.py @@ -1,4 +1,14 @@ +from datetime import datetime + FORMAT_CHAR = '\x19' # These are non-printable chars, so they should never appear in the input, # I guess. But maybe we can find better chars that are even less risky. FORMAT_CHARS = '\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x1A' + +# Short date format (only show time) +SHORT_FORMAT = '%H:%M:%S' +SHORT_FORMAT_LENGTH = len(datetime.now().strftime(SHORT_FORMAT)) + +# Long date format (show date and time) +LONG_FORMAT = '%Y-%m-%d %H:%M:%S' +LONG_FORMAT_LENGTH = len(datetime.now().strftime(LONG_FORMAT)) |