mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-18 12:08:31 +02:00
udpated variable name and spacing
This commit is contained in:
parent
319345b5d4
commit
62ab6d36ff
1 changed files with 4 additions and 4 deletions
|
@ -114,14 +114,14 @@ class Journal(object):
|
||||||
"""Parses a journal that's stored in a string and returns a list of entries"""
|
"""Parses a journal that's stored in a string and returns a list of entries"""
|
||||||
|
|
||||||
def get_date_length(myline):
|
def get_date_length(myline):
|
||||||
j=''
|
tmpdate=''
|
||||||
for i in [x for x in myline.split(' ') ]:
|
for i in [x for x in myline.split(' ') ]:
|
||||||
try:
|
try:
|
||||||
dateutil.parser.parse(j+' ' +i)
|
dateutil.parser.parse(tmpdate + ' ' + i)
|
||||||
j=j+' ' +i
|
tmpdate = tmpdate + ' ' + i
|
||||||
except:
|
except:
|
||||||
break
|
break
|
||||||
return len(j.strip())
|
return len(tmpdate.strip())
|
||||||
|
|
||||||
# Entries start with a line that looks like 'date title' - let's figure out how
|
# Entries start with a line that looks like 'date title' - let's figure out how
|
||||||
# long the date will be by constructing one
|
# long the date will be by constructing one
|
||||||
|
|
Loading…
Add table
Reference in a new issue