April 2008 Archives

Apr 14, 2008

djangogigs.com - Finding Django devs or gigs

Posted by Michael Anckaert in Links 'n stuff No comments

The website djangogigs.com is an excellent place for a company to find Django developers or for developers to find work as a (freelance) Django developer.
Two small things are missing though. One is a search function, pretty basic functionality that should be there and the other is that all gigs or developers are listed by country [...]


Apr 9, 2008

Python: Calculating the number of weekdays between dates

Posted by Michael Anckaert in Uncategorized No comments

This Python function will calculate the number of weekdays between two dates.
from datetime import date
from dateutil import rrule

def weekdays(start, end):
weekends = 5, 6
weekdays = [x for x in range(7) if x not in weekends]
days = rrule.rrule(rrule.DAILY, dtstart=start, until=end,
byweekday=weekdays)
return days.count()
Small but effective!