163 else: |
163 else: |
164 self.cachedIsArrival = False |
164 self.cachedIsArrival = False |
165 return self.cachedIsArrival |
165 return self.cachedIsArrival |
166 else: |
166 else: |
167 return self == self.trip.schedule[-1] |
167 return self == self.trip.schedule[-1] |
|
168 def departure_datetime(self, date): |
|
169 import datetime |
|
170 return datetime.datetime.combine(date, datetime.time()) + self.departure_time |
|
171 def arrival_datetime(self, date): |
|
172 import datetime |
|
173 return datetime.datetime.combine(date, datetime.time()) + self.arrival_time |
168 def __repr__(self): |
174 def __repr__(self): |
169 return 'BusHalt(%r, %r, %r, %r)' % (self.arrival_time, self.departure_time, self.stop, self.trip) |
175 return 'BusHalt(%r, %r, %r, %r)' % (self.arrival_time, self.departure_time, self.stop, self.trip) |
170 def sign(self, long = False): |
176 def sign(self, long = False): |
171 from busroute import reduce_schedule |
177 from busroute import reduce_schedule |
172 return reduce_schedule( |
178 return reduce_schedule( |