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