Ticket #9672: patch.timesince.diff

File patch.timesince.diff, 445 bytes (added by anonymous, 7 years ago)
  • timesince.py

    old new  
    6464            now = datetime.datetime.now(LocalTimezone(d))
    6565        else:
    6666            now = datetime.datetime.now()
     67
     68    # Convert datetime.date to datetime.datetime for comparison
     69    if d.__class__ is not datetime.datetime:
     70        d = datetime.datetime(d.year, d.month, d.day)
     71
    6772    return timesince(now, d)
Back to Top