mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Compatibility with parsedatetime 1.x
This commit is contained in:
parent
1c0916a8f3
commit
5236ca0c44
2 changed files with 3 additions and 4 deletions
|
@ -4,7 +4,6 @@
|
||||||
from Entry import Entry
|
from Entry import Entry
|
||||||
import os
|
import os
|
||||||
import parsedatetime.parsedatetime as pdt
|
import parsedatetime.parsedatetime as pdt
|
||||||
import parsedatetime.parsedatetime_consts as pdc
|
|
||||||
import re
|
import re
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import time
|
import time
|
||||||
|
@ -15,7 +14,7 @@ import readline, glob
|
||||||
try:
|
try:
|
||||||
from Crypto.Cipher import AES
|
from Crypto.Cipher import AES
|
||||||
from Crypto.Random import random, atfork
|
from Crypto.Random import random, atfork
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
import hashlib
|
import hashlib
|
||||||
import getpass
|
import getpass
|
||||||
|
@ -40,7 +39,7 @@ class Journal:
|
||||||
self.config.update(kwargs)
|
self.config.update(kwargs)
|
||||||
|
|
||||||
# Set up date parser
|
# Set up date parser
|
||||||
consts = pdc.Constants()
|
consts = pdt.Constants()
|
||||||
consts.DOWParseStyle = -1 # "Monday" will be either today or the last Monday
|
consts.DOWParseStyle = -1 # "Monday" will be either today or the last Monday
|
||||||
self.dateparse = pdt.Calendar(consts)
|
self.dateparse = pdt.Calendar(consts)
|
||||||
self.key = None # used to decrypt and encrypt the journal
|
self.key = None # used to decrypt and encrypt the journal
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
clint >= 0.3.1
|
clint >= 0.3.1
|
||||||
parsedatetime >= 0.8.7
|
parsedatetime == 1.1.2
|
||||||
|
|
Loading…
Add table
Reference in a new issue