__init__.py 875 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. class date(object):
  2. def __init__(self, year, month, day):
  3. #TODO
  4. pass
  5. def __add__(self, other):
  6. #TODO
  7. return timedelta()
  8. def __sub__(self, other):
  9. #TODO
  10. return timedelta()
  11. def weekday(self):
  12. #TODO
  13. return 1
  14. class datetime(object):
  15. year = 0
  16. month = 0
  17. day = 0
  18. hour = 0
  19. minute = 0
  20. second = 0
  21. microsecond = 0
  22. def __init__(self, year=0, month=0, day=0,
  23. hour=0, minute=0, second=0, microsecond=0, tzinfo=None):
  24. #TODO
  25. pass
  26. def __add__(self, other):
  27. #TODO
  28. return timedelta()
  29. def __sub__(self, other):
  30. #TODO
  31. return timedelta()
  32. @classmethod
  33. def now(cls, tz=None):
  34. #TODO
  35. return cls.utcnow()
  36. @classmethod
  37. def utcnow(cls):
  38. #TODO
  39. return cls()
  40. @classmethod
  41. def strptime(cls, date_string, format):
  42. #TODO
  43. pass
  44. def weekday(self):
  45. #TODO
  46. return 1
  47. class timedelta(object):
  48. days = 0
  49. seconds = 0
  50. microseconds = 0