forked from thauber/django-schedule
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date/time range display #26
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Different sites have different preferences for displaying dates and times. Further, different locales will treat dates and times differently.
The date-range and time-range display functions in eventtools (in utils.pprint_timespan) are pretty unwieldy, and difficult to replace with individual preference. This ticket is to implement an easier structure.
The proposal is to remove pprint_timespan, and define the range formats in a setting, which can be overridden or extended on a per-project basis:
Then, in templates, the date can be formatted thus:
{{ events.pretty_date }} to use the DEFAULT format
{{ events.pretty_date_BRIEF }} to use the BRIEF format (using getattr magic).
The text was updated successfully, but these errors were encountered: