diff --git a/CHANGES b/CHANGES index 6a2ac70db..e67ac4202 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,14 @@ +Version 0.5 +=========== + +Released September 5, 2016 + +- Add support for Python 3.5 +- Add holidays and tests for Columbia, Denmark, Spain, United Kingdom +- Fix Martin Luther King, Jr. Day in state of Georgia +- Fix setup.py install error with non-standard sys default encoding + + Version 0.4.1 ============= diff --git a/README.rst b/README.rst index 28f45e2e7..7122f2c53 100644 --- a/README.rst +++ b/README.rst @@ -33,20 +33,32 @@ Example Usage date(2015, 1, 1) in us_holidays # True date(2015, 1, 2) in us_holidays # False - + # The Holiday class will also recognize strings of any format + # and int/float representing a Unix timestamp '2014-01-01' in us_holidays # True - '1/1/2014' in us_holidays # True - 1388597445 in us_holidays # True (Unix timestamp) + '1/1/2014' in us_holidays # True + 1388597445 in us_holidays # True us_holidays.get('2014-01-01') # "New Year's Day" + # Easily create custom Holiday objects with your own dates instead + # of using the pre-defined countries/states/provinces available custom_holidays = holidays.HolidayBase() + # Append custom holiday dates by passing: + # 1) a dict with date/name key/value pairs, custom_holidays.append({"2015-01-01": "New Year's Day"}) + # 2) a list of dates (in any format: date, datetime, string, integer), custom_holidays.append(['2015-07-01', '07/04/2015']) + # 3) a single date item custom_holidays.append(date(2015, 12, 25)) + date(2015, 1, 1) in custom_holidays # True date(2015, 1, 2) in custom_holidays # False - '12/25/2015' in custom_holidays # True + '12/25/2015' in custom_holidays # True + + # For more complex logic like 4th Monday of January, you can inherit the + # HolidayBase class and define your own _populate(year) method. See below + # documentation for examples. Install diff --git a/holidays.py b/holidays.py index 51e8a9dd0..74c318f10 100644 --- a/holidays.py +++ b/holidays.py @@ -9,7 +9,7 @@ # Author: ryanss # Website: https://github.com/ryanss/holidays.py # License: MIT (see LICENSE file) -# Version: 0.4.1 (January 5, 2016) +# Version: 0.5 (September 5, 2016) from datetime import date, datetime @@ -20,7 +20,7 @@ import six -__version__ = '0.4.1' +__version__ = '0.5' MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY = range(7) diff --git a/setup.py b/setup.py index 428c0311a..04e75f16a 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ # Author: ryanss # Website: https://github.com/ryanss/holidays.py # License: MIT (see LICENSE file) -# Version: 0.4.1 (January 5, 2016) +# Version: 0.5 (September 5, 2016) import codecs @@ -19,7 +19,7 @@ setup( name='holidays', - version='0.4.1', + version='0.5', author='ryanss', author_email='ryanssdev@icloud.com', url='https://github.com/ryanss/holidays.py', @@ -44,6 +44,7 @@ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Office/Business :: Scheduling', 'Topic :: Software Development :: Libraries :: Python Modules', diff --git a/tests.py b/tests.py index d7e77017a..774ab00e9 100644 --- a/tests.py +++ b/tests.py @@ -9,7 +9,7 @@ # Author: ryanss # Website: https://github.com/ryanss/holidays.py # License: MIT (see LICENSE file) -# Version: 0.4.1 (January 5, 2016) +# Version: 0.5 (September 5, 2016) from itertools import product from datetime import date, datetime