Simple Dates for Python
simpledates is a library that was born out of the frustration of never being able to remember the Python datetime api. It’s goal is to simplify working with date / datetime and to provide a simple API that’s easy to remember.
Here’s a simple example of the API.
from simpledates import SimpleDate from datetime import datetime sd = SimpleDate('Aug 2nd 2012') sd2 = SimpleDate(datetime.now()) print sd == sd2 print sd2 - sd print sd2.past(days=15) print sd2.future(months=2) print sd2.is_it().weekday() print sd2.is_it().monday() print sd2.past(days=27).is_it().first_of_month() print sd2.past(weeks=12).ago()