summaryrefslogtreecommitdiff
path: root/poezio/ui/consts.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2019-09-28 18:35:23 +0200
committermathieui <mathieui@mathieui.net>2020-05-09 19:46:17 +0200
commit80ce8453f50ccaad4d71fda8811ee33f5ffa3624 (patch)
tree6e4b7f86f97a82c5fd4cebc6a61349283dee2a36 /poezio/ui/consts.py
parenta5ef6ec9105f22d14b7d7ec3b634796fc3466e93 (diff)
downloadpoezio-80ce8453f50ccaad4d71fda8811ee33f5ffa3624.tar.gz
poezio-80ce8453f50ccaad4d71fda8811ee33f5ffa3624.tar.bz2
poezio-80ce8453f50ccaad4d71fda8811ee33f5ffa3624.tar.xz
poezio-80ce8453f50ccaad4d71fda8811ee33f5ffa3624.zip
Rewrite part of the message handling/rendering
Diffstat (limited to 'poezio/ui/consts.py')
-rw-r--r--poezio/ui/consts.py10
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))