mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 04:58:32 +02:00
added config option for locale to make date output work nicer
This commit is contained in:
parent
e78a6523da
commit
74309cf722
2 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,7 @@ from __future__ import unicode_literals
|
||||||
import re
|
import re
|
||||||
import textwrap
|
import textwrap
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
import locale
|
||||||
|
|
||||||
|
|
||||||
class Entry:
|
class Entry:
|
||||||
|
@ -16,6 +17,8 @@ class Entry:
|
||||||
self.tags = self.parse_tags()
|
self.tags = self.parse_tags()
|
||||||
self.starred = starred
|
self.starred = starred
|
||||||
self.modified = False
|
self.modified = False
|
||||||
|
locale.setlocale(locale.LC_TIME, self.journal.config['locale'])
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def tag_regex(tagsymbols):
|
def tag_regex(tagsymbols):
|
||||||
|
|
|
@ -28,6 +28,7 @@ default_config = {
|
||||||
'default_hour': 9,
|
'default_hour': 9,
|
||||||
'default_minute': 0,
|
'default_minute': 0,
|
||||||
'timeformat': "%Y-%m-%d %H:%M",
|
'timeformat': "%Y-%m-%d %H:%M",
|
||||||
|
'locale': "en_US",
|
||||||
'tagsymbols': '@',
|
'tagsymbols': '@',
|
||||||
'highlight': True,
|
'highlight': True,
|
||||||
'linewrap': 79,
|
'linewrap': 79,
|
||||||
|
|
Loading…
Add table
Reference in a new issue