basic_event.py 691 B

123456789101112131415161718192021222324252627282930313233343536
  1. from datetime import datetime, timedelta
  2. class basic_event:
  3. def __init__(self, name, start, stamp, rrule, end = None):
  4. self.name = name
  5. self.start = start
  6. self.tstamp = stamp
  7. self.rrule = rrule
  8. if(end is not None):
  9. self.end = end
  10. else:
  11. self.end = start + timedelta(days=1)
  12. def set_start(self, start):
  13. self.start = start
  14. def set_end(self, end):
  15. self.end = end
  16. def set_name(self, name):
  17. self.name = name
  18. def set_rrule(self, rrule):
  19. self.rrule = rrule
  20. def get_name(self):
  21. return self.name
  22. def get_start(self):
  23. return self.start
  24. def get_end(self):
  25. return self.end
  26. def get_stamp(self):
  27. return self.tstamp
  28. def get_rrule(self):
  29. return self.rrule