From 85b46a08d8c4ef6719b64454abe2c923800b5c56 Mon Sep 17 00:00:00 2001 From: ryanss Date: Thu, 4 Sep 2014 11:03:30 -0400 Subject: [PATCH] Release version 0.3 --- CHANGES | 12 ++++++++++++ README.rst | 31 +++++++++---------------------- holidays.py | 2 +- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/CHANGES b/CHANGES index d3a3905af..833324acf 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,15 @@ +Version 0.3 +=========== + +Released September 4, 2014 + +- Adds federal holidays for Mexico +- Holiday objects can now be combined with the addition operator (see examples + in README) +- optional parameter `default` added to get() method to make it behave the same + as dict.get() + + Version 0.2 =========== diff --git a/README.rst b/README.rst index e1faa3279..06734ba1c 100644 --- a/README.rst +++ b/README.rst @@ -58,16 +58,17 @@ If the above fails, please use easy_install instead: $ easy_install holidays + Available Countries ------------------- -============== ==== ====================================================== -Country Abbr Prov/State Options -============== ==== ====================================================== -Canada() CA() AB, BC, MB, NB, NL, NS, NT, NU, **ON**, PE, QC, SK, YU -Mexico() MX() None -UnitedStates() US() None -============== ==== ====================================================== +============ ==== ====================================================== +Country Abbr Prov/State Options +============ ==== ====================================================== +Canada CA AB, BC, MB, NB, NL, NS, NT, NU, **ON**, PE, QC, SK, YU +Mexico MX None +UnitedStates US None +============ ==== ====================================================== API @@ -93,7 +94,7 @@ observed prov A string specifying a province/state that has unique statutory holidays. - (Default: Canada='ON', UnitedStates=None) + (Default: Canada='ON', Mexico=None, UnitedStates=None) More Examples @@ -196,20 +197,6 @@ More Examples >>> north_america += holidays.UnitedStates() >>> north_america += holidays.Mexico() - # When adding two holiday objects together the optional parameters - # (observed, expand, prov) from the first object will be used - - >>> ca = holidays.CA(years=[2013, 2014], expand=False, prov='BC') - >>> us = holidays.US(years=[2014, 2015], expand=True) - >>> (ca + us).years - set([2013, 2014, 2015]) - >>> (ca + us).prov - "BC" - >>> (ca + us).expand - False - >>> (us + ca).expand - True - # Sometimes we may not be able to use the official federal statutory # holiday list in our code. Let's pretend we work for a company that # does not include Columbus Day as a statutory holiday but does include diff --git a/holidays.py b/holidays.py index 2f2342212..e23fadc68 100644 --- a/holidays.py +++ b/holidays.py @@ -10,7 +10,7 @@ # Website: https://github.com/ryanss/holidays.py # License: MIT (see LICENSE file) -__version__ = '0.3-dev' +__version__ = '0.3' from datetime import date, datetime