resolution.py 684 B

123456789101112131415161718192021222324252627
  1. # -*- coding: utf-8 -*-
  2. # Copyright (c) 2021, Brandon Nielsen
  3. # All rights reserved.
  4. #
  5. # This software may be modified and distributed under the terms
  6. # of the BSD license. See the LICENSE file for details.
  7. from aniso8601 import compat
  8. class DateResolution(object):
  9. Year, Month, Week, Weekday, Day, Ordinal = list(compat.range(6))
  10. class DurationResolution(object):
  11. Years, Months, Weeks, Days, Hours, Minutes, Seconds = list(compat.range(7))
  12. class IntervalResolution(object):
  13. Year, Month, Week, Weekday, Day, Ordinal, Hours, Minutes, Seconds = list(
  14. compat.range(9)
  15. )
  16. class TimeResolution(object):
  17. Seconds, Minutes, Hours = list(compat.range(3))