Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajenbo/calcworkdays.php
Class for calculating workdayes
https://github.com/ajenbo/calcworkdays.php
Last synced: 20 days ago
JSON representation
Class for calculating workdayes
- Host: GitHub
- URL: https://github.com/ajenbo/calcworkdays.php
- Owner: AJenbo
- License: lgpl-3.0
- Created: 2014-11-17T18:21:08.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-17T21:16:14.000Z (about 10 years ago)
- Last Synced: 2024-11-19T00:09:15.106Z (3 months ago)
- Language: PHP
- Size: 133 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CalcWorkDays.php
================Class for doing work day calculations.
###Limitations:
This class works with Unix timestamps and as such is limited to years beetwean 1970 and 2037###Samples
How many days of work until xmas:`
CalcWorkDays::workDaysBetween(
strtotime('today'),
strtotime('dec 24')
)
`Is tomorrow a work day:
`
CalcWorkDays::isWorkDay(strtotime('tomorrow'))
`On what date will we have had 9 dayes of work from next monday:
`
CalcWorkDays::addWorkDays(9, strtotime('monday'))
`Switch to German holidays:
`
CalcWorkDays::$country = 'DE'
`