Metadata-Version: 1.1
Name: Blackskirt
Version: 0.1
Summary: Relative weekday/date utilities useful for finding public holidays
Home-page: https://github.com/microamp/blackskirt
Author: James Nah
Author-email: sangho.nah@gmail.com
License: GNU Lesser General Public License v3 or later (LGPLv3+)
Description: Blackskirt
        ==========
        Relative weekday/date utilities useful for finding public holidays
        
        Installation
        ------------
        .. code-block:: bash
        
            pip install blackskirt
        
        Examples
        --------
        .. code-block:: python
        
            from blackskirt import (WEEKDAY_MON, WEEKDAY_TUE, WEEKDAY_WED,
                                    WEEKDAY_THU, WEEKDAY_FRI, WEEKDAY_SAT,
                                    WEEKDAY_SUN,)
            from blackskirt.blackskirt import (mondayise, next_weekday,
                                               prev_weekday, nearest_weekday,
                                               nth_weekday, last_weekday,
                                               next_date, prev_date, nearest_date,)
        
        ``mondayise``
        ~~~~~~~~~~~~~
        
        1. New Year's Day: 1 January (or the following Monday if it falls on a Saturday or Sunday)
        
        .. code-block:: python
        
            # 2011-01-01 is Saturday
            assert mondayise("2011-01-01", cases=((WEEKDAY_SAT, WEEKDAY_MON),
                                                  (WEEKDAY_SUN, WEEKDAY_MON),)) == "2011-01-03"
        
        2. Day after New Year's Day: 2 January (or the following Monday if it falls on a Saturday, or the following Tuesday if it falls on a Sunday)
        
        .. code-block:: python
        
            # 2011-01-02 is Sunday
            assert mondayise("2011-01-02", cases=((WEEKDAY_SAT, WEEKDAY_MON),
                                                  (WEEKDAY_SUN, WEEKDAY_TUE),)) == "2011-01-03"
        
        ``nth_weekday``
        ~~~~~~~~~~~~~~~
        
        Labour Day: The fourth Monday in October
        
        .. code-block:: python
        
            assert nth_weekday(2014, 10, n=4, weekday=WEEKDAY_MON) == "2014-10-27"
        
        ``next_weekday``
        ~~~~~~~~~~~~~~~~
        
        Marlborough provincial anniversary day: First Monday after Labour Day
        
        .. code-block:: python
        
            assert next_weekday("2014-10-27", weekday=WEEKDAY_MON) == "2014-11-03"
        
        ``nearest_weekday``
        ~~~~~~~~~~~~~~~~~~~
        
        Wellington provincial anniversary day: 22 January (Monday nearest to the actual day)
        
        .. code-block:: python
        
            # 2014-01-22 is Wednesday
            nearest_weekday("2014-01-22", weekday=WEEKDAY_MON) == "2014-01-20"
        
        ``last_weekday``
        ~~~~~~~~~~~~~~~~
        
        Memorial Day: Last Monday in May
        
        .. code-block:: python
        
            assert last_weekday(2014, 5, weekday=WEEKDAY_MON) == "2014-05-26"
        
        ``next_date``
        ~~~~~~~~~~~~~
        
        Inauguration Day: First January 20 following a Presidential election
        
        .. code-block:: python
        
            # 2012-11-06 was the previous presidential election day in US
            assert next_date(1, 20, offset="2012-11-06") == "2013-01-20"
        
        License
        -------
        All the code is licensed under the GNU Lesser General Public License (v3+).
        
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Topic :: Software Development :: Libraries
