networkdays¶
-
class
networkdays.networkdays.
JobSchedule
(project_duration_hours, workhours_per_day, date_start, networkdays=None)¶ -
days
()¶
-
job_workdays
()¶ list workdays for a given job duration
- Returns
workday datetime.date list
- Return type
list
-
months
(year=None)¶ return a weeks iterATOR
- Parameters
year (None, optional) – Description
- Returns
Description
- Return type
TYPE
-
weeks
(year=None, month=None)¶ return an interator for ISO format see https://docs.python.org/3/library/datetime.html#datetime.date.isocalendar)
- Parameters
year (None, optional) – filter per year
month (None, optional) – filter per month
- Returns
weeks iso numbers based
- Return type
iter
-
years
()¶ Its not duration
-
-
class
networkdays.networkdays.
Networkdays
(date_start, date_end=None, holidays={}, weekdaysoff={6, 7})¶ -
holidays
()¶
-
networkdays
()¶ NetWorkDays like Excel Networkdays function. given 2 dates, the return will the number of days between dates, minus holidays, e week days off (ex.: saturday and sunday).
The weekdaysoff is a per week ISO days list where Monday is 1 and sunday is 7. The holidays may be any single date, datetime.date object, in a year.
- Parameters
date_start (datetime.date) – initial date
date_end (datetime.date) – end date, or if none, is the last day of the date_start year.
holidays (sipytho net) – list of datetime object, indicating days off.
weekdaysoff (set) – list of weekdays not working, default is Saturday and Sunday {6,7}.
- Returns
list of work days.
- ex.:
- networkdays(
datetime.date(2020,1,1), datetime.date(2020,2,31), holiday=datetime.date(2020,1,1), weekdaysoff={6,7}
)
-
weekends
()¶
-