Utilities for work days in Arrow. Inspired by moment-business.
Utilities for working with week days and weekend days in Arrow. It assumes a Western workweek, in which weekends are Saturday and Sunday.
This module was inspired by moment-business; https://github.com/jmeas/moment-business/
Arrow is a Python library that offers a sensible, human-friendly approach to creating, manipulating, formatting and converting dates, times, and timestamps
This library supplies you with tools to work with/manipulate weekdays and weekends.
Install using pip.
pip install git+https://github.com/dedayoa/arrow-weekdayNext, import it into your project.
from arrow_weekday import ArrowWeekday
ArrowWeekday.isWeekDay(arrowObj);This library uses inclusive start, exclusive end intervals. What this means is that the start day is included in the result, but the end day is not.
This is consistent with how Arrow's intervals work.
For example, the total number of days between March 1st, 2020 and March 2nd, 2020 will be computed as 1.
Calculate the number of week days between startArrow and endArrow. Week days are Monday through Friday.
If endArrow comes before startArrow, then this function will return a negative value.
Calculate the number of weekend days between the startArrow and endArrow. Weekend days are Saturday and Sunday.
If endArrow comes before startArrow, then this function will return a negative value.
Add week days to a arrowObj, modifying the original arrowObj. Returns an arrowObj.
Subtract week days from the arrowObj, modifying the original arrowObj. Returns an arrowObj.
Whether or not the Arrow is a week day (Monday - Friday).
Whether or not the Arrow occurs on Saturday or Sunday.