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. Media RSS generation for Photologue by ltvolks 2 years, 9 months ago
  2. EasyFeed class by limodou 5 years, 2 months ago
  3. HTTP (basic) auth enabled (new-style) syndication framework feed class by hupf 1 year, 5 months ago
  4. Smart i18n date diff (twitter like) by Batiste 3 years, 1 month ago
  5. Date/time util template filters by marinho 4 years, 6 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?)