ago 0.0.2

Public Domain


ago 0.0.2

ago is a Python module that provides human readable timedeltas.

How to install

easy_install ago

How to use

Import ago and create a timedelta object:

from ago import delta2dict, human

from datetime import datetime

# pretend this was stored in database
d1 = datetime(
 year = 2010,
 month=5,
 day=4,
 hour=6,
 minute=54,
 second=33,
 microsecond=4000
 )

# this is right now
d2 = datetime.now()

# subtract the two for a timedelta object
delta = d2 - d1

# create a dictionary out of the timedelta
# not needed but accessable
delta_dict = delta2dict( delta )
print delta_dict

# display a human readable timedelta
print 'Created ' + human( delta ) + ' ago.'

# optionally pass a precision
print 'Created ' + human( delta, 3 ) + ' ago.'
print 'Created ' + human( delta, 6 ) + ' ago.'



Product's homepage

Requirements:

· Python

Download and use it now: ago 0.0.2 free download

Add a review

Tell us your experience with ago 0.0.2

Related programsOur Recommendations

eea.versions 4.6

eea.versions is a versioning system based on a version ID to groupcertains objects and

Download

Krecipes 2.0 Beta 2

Krecipes is a new Open Source project for an exciting world that is almost forgotten in the Tux

Download

Taurus 3.0.0

Taurus stands for TAngo User interface 'R' US and is a Python framework for both CLI and GUI tango

Download

FunEyes 1.0 Beta 2

FunEyes is a Qt4 fun faces desktop toy based on KEyes.Developer commentsI've rewrote it in C++ and

Download

Postfix 2.9.6

Postfix is an open source mailer tool that started life as an alternative to the widely-used

Download

Clemson University for Google Chrome 0.7.1.0

This is a Google Chrome and Firefox theme especially designed for serious Clemson athletics fans.

Download

Ring sensors hotified 0.5

Ring sensors hotified is a modified version of the Ring Sensors packaged with screenlets to be able

Download

YAZ 4.2.49

YAZ is a programmers’ toolkit supporting the development of Z39.50/SRW/SRU clients and servers.

Download

Big Blue 1.0

Big Blue is a GTK theme based on Soffice but with more blue. This is a fairly simple design with

Download

Console2 0.9

Console2 is an extension that replaces the JavaScript Console with what could be the next

Download


Thumbnail of ago 0.0.2

Rating:

3 stars

Price: FREE

Publisher/Developer: Russell Ballestrini

Release Date: Jul 4, 2012

View Program Details

Top Downloadslast week