Skip to content

Commit 442f000

Browse files
author
ryanss
committed
Release version 0.5
1 parent 2787ed1 commit 442f000

5 files changed

Lines changed: 33 additions & 9 deletions

File tree

CHANGES

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Version 0.5
2+
===========
3+
4+
Released September 5, 2016
5+
6+
- Add support for Python 3.5
7+
- Add holidays and tests for Columbia, Denmark, Spain, United Kingdom
8+
- Fix Martin Luther King, Jr. Day in state of Georgia
9+
- Fix setup.py install error with non-standard sys default encoding
10+
11+
112
Version 0.4.1
213
=============
314

README.rst

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,32 @@ Example Usage
3333
date(2015, 1, 1) in us_holidays # True
3434
date(2015, 1, 2) in us_holidays # False
3535
36-
36+
# The Holiday class will also recognize strings of any format
37+
# and int/float representing a Unix timestamp
3738
'2014-01-01' in us_holidays # True
38-
'1/1/2014' in us_holidays # True
39-
1388597445 in us_holidays # True (Unix timestamp)
39+
'1/1/2014' in us_holidays # True
40+
1388597445 in us_holidays # True
4041
4142
us_holidays.get('2014-01-01') # "New Year's Day"
4243
44+
# Easily create custom Holiday objects with your own dates instead
45+
# of using the pre-defined countries/states/provinces available
4346
custom_holidays = holidays.HolidayBase()
47+
# Append custom holiday dates by passing:
48+
# 1) a dict with date/name key/value pairs,
4449
custom_holidays.append({"2015-01-01": "New Year's Day"})
50+
# 2) a list of dates (in any format: date, datetime, string, integer),
4551
custom_holidays.append(['2015-07-01', '07/04/2015'])
52+
# 3) a single date item
4653
custom_holidays.append(date(2015, 12, 25))
54+
4755
date(2015, 1, 1) in custom_holidays # True
4856
date(2015, 1, 2) in custom_holidays # False
49-
'12/25/2015' in custom_holidays # True
57+
'12/25/2015' in custom_holidays # True
58+
59+
# For more complex logic like 4th Monday of January, you can inherit the
60+
# HolidayBase class and define your own _populate(year) method. See below
61+
# documentation for examples.
5062
5163
5264
Install

holidays.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Author: ryanss <ryanssdev@icloud.com>
1010
# Website: https://github.com/ryanss/holidays.py
1111
# License: MIT (see LICENSE file)
12-
# Version: 0.4.1 (January 5, 2016)
12+
# Version: 0.5 (September 5, 2016)
1313

1414

1515
from datetime import date, datetime
@@ -20,7 +20,7 @@
2020
import six
2121

2222

23-
__version__ = '0.4.1'
23+
__version__ = '0.5'
2424

2525

2626
MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY = range(7)

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Author: ryanss <ryanssdev@icloud.com>
88
# Website: https://github.com/ryanss/holidays.py
99
# License: MIT (see LICENSE file)
10-
# Version: 0.4.1 (January 5, 2016)
10+
# Version: 0.5 (September 5, 2016)
1111

1212

1313
import codecs
@@ -19,7 +19,7 @@
1919

2020
setup(
2121
name='holidays',
22-
version='0.4.1',
22+
version='0.5',
2323
author='ryanss',
2424
author_email='ryanssdev@icloud.com',
2525
url='https://github.com/ryanss/holidays.py',
@@ -44,6 +44,7 @@
4444
'Programming Language :: Python :: 3.2',
4545
'Programming Language :: Python :: 3.3',
4646
'Programming Language :: Python :: 3.4',
47+
'Programming Language :: Python :: 3.5',
4748
'Programming Language :: Python :: Implementation :: PyPy',
4849
'Topic :: Office/Business :: Scheduling',
4950
'Topic :: Software Development :: Libraries :: Python Modules',

tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Author: ryanss <ryanssdev@icloud.com>
1010
# Website: https://github.com/ryanss/holidays.py
1111
# License: MIT (see LICENSE file)
12-
# Version: 0.4.1 (January 5, 2016)
12+
# Version: 0.5 (September 5, 2016)
1313

1414
from itertools import product
1515
from datetime import date, datetime

0 commit comments

Comments
 (0)