Re: "X seconds/minutes/hours/months/years ago" dates

"Benj. Mako Hill" <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
<quote who="chombee" date="Tue, May 29, 2007 at 07:51:37PM +0100">
> I wonder if it would be possible to get a pyblosxom flavour to display
> the date of each story in the format:
> 
> "X [seconds|minutes|hours|days|months|years] ago"
> 
> instead of "posted at: 18:37." Would this require a new plugin?
> Shouldn't be difficult to write, get the posted date of the story, get
> the current date from the system, do some math.

This little chunk of cde is probably most of what you want (and perhaps
even more since it also does it in Swedish):

  http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498062

Regards,
Mako

-- 
Benjamin Mako Hill
[email protected]
http://mako.cc/

Creativity can be a social contribution, but only in so
far as society is free to use the results. --RMS

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
pyblosxom-users mailing list
pyblosxom-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/pyblosxom-users
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGXHynic1LIWB1WeYRArW0AKDkHet66YSSuMoS2K2gFTS1efm6TACgnGTY
u1SAN1OKf5oDFyNXX7e8S/Q=
=r5gH
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.