python-dateutil is very cool for getting a correct date from a  
relative difference, it seems like they put a lot of work in getting  
all of the nasty bits (like leapyears etc.) right, but does anyone  
know about a library that can do this the other way around?

as in:

#input
date1 = now
date2 = 22nd of May 2006

#output
output of delta = "more than a month ago"
or output = "1 month and 4 days ago"

On Jun 23, 2006, at 9:30 PM, Adrian Klaver wrote:

> Take a look at python-dateutil:
>
> http://labix.org/python-dateutil
>
> It offers a variety of ways to represent date and time objects.
>
> On Friday 23 June 2006 10:00 am, Koen Bok wrote:
>> Does anyone know if there is a python library available to make
>> natural language strings from timedelta objects?
>>
>> So I'd like to have this:
>>
>> 1 Month 4 days and 3 hours ago
>
> -- 
> Adrian Klaver 
> [EMAIL PROTECTED]
>
> Using Tomcat but need to do more? Need to support web services,  
> security?
> Get stuff done quickly with pre-integrated technology to make your  
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
> Geronimo
> http://sel.as-us.falkag.net/sel? 
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Sqlalchemy-users mailing list
> Sqlalchemy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
>


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to