diff --git a/ical2org.py b/ical2org.py index 9390796..22714ed 100755 --- a/ical2org.py +++ b/ical2org.py @@ -8,8 +8,9 @@ # Change here your local timezone LOCAL_TZ = timezone("Europe/Paris") -# Window lenght in days (left & right from current time). Has to be possitive. -WINDOW = 90 +# Window length in days (left & right from current time). Has to be positive. +LEFT_WINDOW = 30 # into the past +RIGHT_WINDOW = 90 # into the future # leave empty if you don't want to attach any tag to recurring events RECUR_TAG = ":RECURRING:" @@ -196,8 +197,8 @@ def next(self): cal = Calendar.from_ical(fh.read()) now = datetime.now(utc) -start = now - timedelta( days = WINDOW) -end = now + timedelta( days = WINDOW) +start = now - timedelta( days = LEFT_WINDOW) +end = now + timedelta( days = RIGHT_WINDOW) for comp in cal.walk(): try: event_iter = generate_event_iterator(comp, start, end)