All Projects → cadu-leite → networkdays

cadu-leite / networkdays

Licence: other
Networkdays functions ... including `networkdays` excel like function with no dependencies (no NumPy)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to networkdays

Calendar
Календарь событий по фронтенду
Stars: ✭ 395 (+1695.45%)
Mutual labels:  events, calendar
wp-event-calendar
The best way to manage events in WordPress
Stars: ✭ 46 (+109.09%)
Mutual labels:  events, calendar
Laravel Google Calendar
Manage events on a Google Calendar
Stars: ✭ 787 (+3477.27%)
Mutual labels:  events, calendar
sugarcalendar-core
Sugar Calendar plugin for WordPress
Stars: ✭ 40 (+81.82%)
Mutual labels:  events, calendar
React Native Add Calendar Event
Create, view or edit events in react native using the standard iOS / Android dialogs
Stars: ✭ 225 (+922.73%)
Mutual labels:  events, calendar
Fb2cal
Fetch Facebook Birthdays events and create an ICS file for use with calendar apps
Stars: ✭ 335 (+1422.73%)
Mutual labels:  events, calendar
Ls.joyous
A calendar application for Wagtail
Stars: ✭ 53 (+140.91%)
Mutual labels:  events, calendar
Life Calendar
A look at the big picture.
Stars: ✭ 139 (+531.82%)
Mutual labels:  calendar, scheduler
Quasar Ui Qcalendar
QCalendar - Quasar App Extension, Vue CLI plug-in and UMD distributions available
Stars: ✭ 148 (+572.73%)
Mutual labels:  events, calendar
Flutter Timeline
⌚️ A general flutter timeline widget based on real-world application references
Stars: ✭ 142 (+545.45%)
Mutual labels:  events, calendar
contao-events subscriptions
Contao extension that allows members of your website to subscribe to the events
Stars: ✭ 12 (-45.45%)
Mutual labels:  events, calendar
svelte-fullcalendar
A Svelte component wrapper around FullCalendar
Stars: ✭ 123 (+459.09%)
Mutual labels:  calendar, scheduler
Klendario
A Swift wrapper over the EventKit framework
Stars: ✭ 44 (+100%)
Mutual labels:  events, calendar
Cadar
Android solution which represents month and list calendar views.
Stars: ✭ 360 (+1536.36%)
Mutual labels:  events, calendar
Time
Building a better date/time library for Swift
Stars: ✭ 1,983 (+8913.64%)
Mutual labels:  calendar, dates
Forcal
📅 Das AddOn ist ein variabel einsetzbarer Kalender(-Generator), Skedule, Newssystem, Event- und Terminplaner für REDAXO 5.x.
Stars: ✭ 52 (+136.36%)
Mutual labels:  events, calendar
Jquery Calendar
A responsive jquery calendar scheduler built with bootstrap and moment.js
Stars: ✭ 67 (+204.55%)
Mutual labels:  calendar, scheduler
Devextreme Reactive
Business React components for Bootstrap and Material-UI
Stars: ✭ 1,800 (+8081.82%)
Mutual labels:  calendar, scheduler
Easyappointments
Easy!Appointments is a highly customizable web application that allows customers to book appointments with you via a sophisticated web interface. Moreover, it provides the ability to sync your data with Google Calendar so you can use them with other services. It is an open source project that you can download and install even for commercial use. Easy!Appointments will run smoothly with your existing website as it can be installed in a single folder of the server and of course share an existing database.
Stars: ✭ 2,013 (+9050%)
Mutual labels:  events, scheduler
yii2-fullcalendar-scheduler
Yii 2 component for easy fullcalendar scheduler integration
Stars: ✭ 24 (+9.09%)
Mutual labels:  calendar, scheduler

Networkdays

some statistics ...

Pypi Version Doc Status Coverage Downloads
pypi version Documentation Status code coverage Downloads on Pypi

  • Business days calendar.
  • JobSchedule on business days.

Tip

Just Python built-in libs, no dependencies

Networkdays:

Return working days between two dates exclude weekends and holidays.

  • just like spreadsheets networdays function
  • exclude Holidays
  • Exclude "days off" per week.
Job schedule:
Calculate the period for a given job hours, based on Networdays.

Installation

python-networkdays can be installed from PyPI using pip

pip install python-networkdays

Tip

note that the package name is different from the importable name

Page on Pypi: https://pypi.org/project/python-networkdays/

There is no dependencies.

Features

  • Return a list of business days between 2 dates.
  • Exclude weekends by default
  • Custom "days off" may be informed as list like {1,2,3,4,5,6,7}, where 1 is Monday default is {6,7} = (Sat, Sun).
  • How many business days between two dates.
  • How many days off, including holidays and weekends.
  • Return a list of business days for a given number of hours
  • Return a list of Years, months or weeks for a given number of hours
  • No Pandas or NumPy dependencies

Examples

Class Networkdays.networkdays

List business days, weekends and Holidays

In [1]: from networkdays import networkdays

In [2]: import datetime

In [3]: HOLIDAYS = { datetime.date(2020, 12, 25) }  # define a Holidays list

# initiate  class::`networkdays.Networkdays`
In [4]: days = networkdays.Networkdays(
            datetime.date(2020, 12, 15),  # start date
            datetime.date(2020, 12, 31),  # end date
            HOLIDAYS  # list of Holidays
        )

In [5]: days.networkdays()  # return a list os workdays
Out[5]:
[datetime.date(2020, 12, 15),
 datetime.date(2020, 12, 16),
 datetime.date(2020, 12, 17),
 datetime.date(2020, 12, 18),
 datetime.date(2020, 12, 21),
 datetime.date(2020, 12, 22),
 datetime.date(2020, 12, 23),
 datetime.date(2020, 12, 24),
 datetime.date(2020, 12, 28),
 datetime.date(2020, 12, 29),
 datetime.date(2020, 12, 30),
 datetime.date(2020, 12, 31)]

In [6]: days.weekends()  # list os Weekends (default = Saturday ans Sunday)
Out[6]:
[datetime.date(2020, 12, 19),
 datetime.date(2020, 12, 20),
 datetime.date(2020, 12, 26),
 datetime.date(2020, 12, 27)]

In [7]: days.holidays()
Out[7]: [datetime.date(2020, 12, 25)] # list of holidays

class Networkdays.jobschedule

>>> from networkdays import networkdays
>>> import datetime
>>> # Distribute the 600 hrs of effort, starting on december 1, 2020 working 8hrs per day.
>>> jobschedule = networkdays.JobSchedule(600, 8, datetime.date(2020, 12, 1), networkdays=None)
>>> job_dates = jobschedule.job_workdays()
>>> jobschedule.bussines_days
54
>>> jobschedule.total_days
datetime.timedelta(days=73)
>>> jobschedule.prj_starts
'12/01/20'
>>> jobschedule.prj_ends
'02/12/21'
>>> list(jobschedule.years())
[2020, 2021]
>>> list(jobschedule.months())
[12, 1, 2]
>>> list(jobschedule.weeks()) # ISO
[49, 50, 51, 52, 53, 1, 2, 3, 4, 5, 6]
>>> f'days: {list(jobschedule.days())[:2]} ... {list(jobschedule.days())[-2:]}'
'days: [datetime.date(2020, 12, 1), datetime.date(2020, 12, 2)] ... [datetime.date(2021, 2, 11), datetime.date(2021, 2, 12)]'

Other similar projects

When I start to code, I did check for some similar projects.

I knew about python-dateutil, a great project I use for years... I'd like something more straightforward or simpler.

After to publish the python-networkdays on PyPi I found some others 8(

I will try to keep this list updated...

More on ..

https://networkdays.readthedocs.io/index.html

https://libraries.io/pypi/python-networkdays/sourcerank

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].