Changeset 6471
- Timestamp:
- 10/10/07 10:51:38 (11 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/0.91-bugfixes/django/core/template/defaultfilters.py
r6468 r6471 328 328 ################### 329 329 330 EMPTY_DATE_VALUES = (None, '') 331 330 332 def date(value, arg=DATE_FORMAT): 331 333 "Formats a date according to the given format" 332 if not value:334 if value in EMPTY_DATE_VALUES: 333 335 return '' 334 336 from django.utils.dateformat import format … … 337 339 def time(value, arg=TIME_FORMAT): 338 340 "Formats a time according to the given format" 339 if not value:341 if value in EMPTY_DATE_VALUES: 340 342 return '' 341 343 from django.utils.dateformat import time_format … … 344 346 def timesince(value): 345 347 'Formats a date as the time since that date (i.e. "4 days, 6 hours")' 346 if not value:348 if value in EMPTY_DATE_VALUES: 347 349 return '' 348 350 from django.utils.timesince import timesince
