You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I guess these are not really all-day events as they simply start at noon and end in the same instant. Would it be easier to mix different event types in the same Calendar (i.e. all-day, multi-day all-day, no specified end, fixed end or duration, maybe even with/without timezones?) and then thoroughly test that calendar?
Note: We could also infer that an Event should be all-day if its created from dates instead of datetimes, but currently the ensure_datetimehere silently sets the time to midnight if its missing and ignores this distinction. Something like the following might fix that but needs further testing.
if (beginisnotNoneorendisnotNoneordurationisnotNone) and"timespan"inkwargs:
raiseValueError("can't specify explicit timespan together with any of begin, end or duration")
timespan=kwargs.pop("timespan", EventTimespan(ensure_datetime(begin), ensure_datetime(end), ensure_timedelta(duration)))
ifisinstance(begin, date) andnottimespan.get_effective_duration().seconds: # TODO we should also drop microseconds to be able to ignore them heretimespan=timespan.make_all_day()
super(Event, self).__init__(timespan, summary, *args, **kwargs)
I guess these are not really all-day events as they simply start at noon and end in the same instant. Would it be easier to mix different event types in the same Calendar (i.e. all-day, multi-day all-day, no specified end, fixed end or duration, maybe even with/without timezones?) and then thoroughly test that calendar?
Note: We could also infer that an Event should be all-day if its created from
date
s instead ofdatetime
s, but currently theensure_datetime
here silently sets the time to midnight if its missing and ignores this distinction. Something like the following might fix that but needs further testing.Originally posted by @N-Coder in #325 (comment)
The text was updated successfully, but these errors were encountered: