Django

Code

Changeset 6471

Show
Ignore:
Timestamp:
10/10/07 10:51:38 (11 months ago)
Author:
ubernostrum
Message:

0.91-bugfixes: Minor improvement to [6468

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/0.91-bugfixes/django/core/template/defaultfilters.py

    r6468 r6471  
    328328################### 
    329329 
     330EMPTY_DATE_VALUES = (None, '') 
     331 
    330332def date(value, arg=DATE_FORMAT): 
    331333    "Formats a date according to the given format" 
    332     if not value
     334    if value in EMPTY_DATE_VALUES
    333335        return '' 
    334336    from django.utils.dateformat import format 
     
    337339def time(value, arg=TIME_FORMAT): 
    338340    "Formats a time according to the given format" 
    339     if not value
     341    if value in EMPTY_DATE_VALUES
    340342        return '' 
    341343    from django.utils.dateformat import time_format 
     
    344346def timesince(value): 
    345347    '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
    347349        return '' 
    348350    from django.utils.timesince import timesince