dates.py 344 B

1234567891011121314
  1. from datetime import timedelta
  2. from django.conf import settings
  3. from django.utils import timezone
  4. def is_date_tracked(date, user, forum_read_cutoff=None):
  5. if date:
  6. if forum_read_cutoff and forum_read_cutoff > date:
  7. return False
  8. else:
  9. return date > user.reads_cutoff
  10. else:
  11. return False