From 62ab6d36ff673eb2eb7d7ba90a1ce98ca88ccff1 Mon Sep 17 00:00:00 2001 From: lmckiwo Date: Sat, 6 Dec 2014 08:42:54 -0500 Subject: [PATCH] udpated variable name and spacing --- jrnl/Journal.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 2a56a9d9..f562a4c7 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -114,14 +114,14 @@ class Journal(object): """Parses a journal that's stored in a string and returns a list of entries""" def get_date_length(myline): - j='' + tmpdate='' for i in [x for x in myline.split(' ') ]: try: - dateutil.parser.parse(j+' ' +i) - j=j+' ' +i + dateutil.parser.parse(tmpdate + ' ' + i) + tmpdate = tmpdate + ' ' + i except: break - return len(j.strip()) + return len(tmpdate.strip()) # Entries start with a line that looks like 'date title' - let's figure out how # long the date will be by constructing one