Skip to content

Commit

Permalink
Release version 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanss committed Sep 5, 2016
1 parent 2787ed1 commit 442f000
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 9 deletions.
11 changes: 11 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -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
=============

Expand Down
20 changes: 16 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions holidays.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Author: ryanss <[email protected]>
# 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
Expand All @@ -20,7 +20,7 @@
import six


__version__ = '0.4.1'
__version__ = '0.5'


MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY = range(7)
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Author: ryanss <[email protected]>
# 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
Expand All @@ -19,7 +19,7 @@

setup(
name='holidays',
version='0.4.1',
version='0.5',
author='ryanss',
author_email='[email protected]',
url='https://github.com/ryanss/holidays.py',
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Author: ryanss <[email protected]>
# 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
Expand Down

0 comments on commit 442f000

Please sign in to comment.