title: How to determine if a date was a public holiday in python?
body: <p>I am writing a code in python and at one stage I need to determine if some given past dates were public holidays or days off in a certain locality such as New York, London, Tokyo, Sydney. I am only concerned with past dates (going back to 2002) and days off that actually happened regardless of whether they were officially planned or not. My dates are represented as a list of datetime objects and I use pytz to indicate localities. How can this be done in python?</p>