Template-Filter for Feedparser-Dates

1
2
3
4
5
6
7
8
9
from django.template import Library
import datetime 

register = Library()

def feedparsed(value):
    return datetime.datetime(*value[:6])

register.filter(feedparsed)

More like this

  1. HTTP (basic) auth enabled (new-style) syndication framework feed class by hupf 2 years, 5 months ago
  2. Widget for DateTime values on Geraldo Reports by marinho 4 years, 1 month ago
  3. EasyFeed class by limodou 6 years, 2 months ago
  4. Parsed RSS into template var by bram 4 years, 10 months ago
  5. Display arbitrary models by bjornkri 4 years, 10 months ago

Comments

shacker (on September 29, 2009):

Brilliant in its simplicity, and exactly what I came looking for. Works perfectly. Thanks!

#

(Forgotten your password?)