1.1 --- a/imiptools/period.py Tue Sep 08 00:23:49 2015 +0200
1.2 +++ b/imiptools/period.py Tue Sep 08 00:26:45 2015 +0200
1.3 @@ -156,12 +156,16 @@
1.4
1.5 "A free/busy record abstraction."
1.6
1.7 - def __init__(self, start, end, uid=None, transp=None, recurrenceid=None, summary=None, organiser=None):
1.8 + def __init__(self, start, end, uid=None, transp=None, recurrenceid=None, summary=None, organiser=None, expires=None):
1.9
1.10 """
1.11 Initialise a free/busy period with the given 'start' and 'end' points,
1.12 plus any 'uid', 'transp', 'recurrenceid', 'summary' and 'organiser'
1.13 details.
1.14 +
1.15 + An additional 'expires' parameter can be used to indicate an expiry
1.16 + datetime in conjunction with free/busy offers made when countering
1.17 + event proposals.
1.18 """
1.19
1.20 self.start = isinstance(start, datetime) and start or get_datetime(start)
1.21 @@ -171,6 +175,7 @@
1.22 self.recurrenceid = recurrenceid
1.23 self.summary = summary
1.24 self.organiser = organiser
1.25 + self.expires = expires
1.26
1.27 def as_tuple(self, strings_only=False):
1.28
1.29 @@ -187,7 +192,8 @@
1.30 self.transp or strings_only and "OPAQUE" or None,
1.31 self.recurrenceid or null(self.recurrenceid),
1.32 self.summary or null(self.summary),
1.33 - self.organiser or null(self.organiser)
1.34 + self.organiser or null(self.organiser),
1.35 + self.expires or null(self.expires)
1.36 )
1.37
1.38 def __cmp__(self, other):