Commit bc668d6f authored by heemayl's avatar heemayl

Epoch conv lib: Added empty whitespace support between words after [+-]

parent 28b5efcc
......@@ -5,7 +5,6 @@ import datetime
import itertools
import operator
import re
import sys
import time
......@@ -24,9 +23,11 @@ class DateTime:
to Python datetime object and converts that into Epoch eventually.
'''
def __init__(self, str_dt):
self.str_dt = str_dt.lower().strip().strip(':')\
.replace('+', ' + ')\
.replace('-', ' - ')
self.str_dt = re.sub(r'([+-]\s+\d+)([a-z]+)',
r'\1 \2', str_dt.lower().strip().strip(':')
.replace('+', ' + ')
.replace('-', ' - ')
)
self.list_dt = self.str_dt.split()
def check_get(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment