PHP Classes

PHP Business Days: API to retrieve information about business days

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 66 All time: 10,372 This week: 206Up
Version License PHP version Categories
businessdate 1.0The PHP License5PHP 5, Time and Date, Web services
Description 

Author

This package provides an API to retrieve information about business days.

It provides an application that is served as an API that clients can send HTTP requests to retrieve information about the dates of the days that businesses are working on.

Currently it provides several API functions to:

- Check if a given date is of a business day
- Get the business days between two dates

Innovation Award
PHP Programming Innovation award nominee
September 2021
Number 8
Many applications need to schedule dates according to the expected number of days a task needs to finish.

For instance, when a site takes e-commerce orders, it is ideal for estimating the number of business days that the order will take to be delivered.

This class provides an API for returning details of business days that give realistic estimates of final delivery dates for a task to be completed considering the days that are not business days.

Manuel Lemos
Picture of Edward Paul
  Performance   Level  
Innovation award
Innovation award
Nominee: 12x

Winner: 1x

 

Documentation

<p align="center">Business Date</p> <p align="center"><a href="#">Creator</a> | I Craft Ideas Into Realities</p>

<p>&nbsp;</p>

Download Instruction

> Application Requirements * PHP >= 7.1.3 * OpenSSL PHP Extension * PDO PHP Extension * Mbstring PHP Extension

  1. Clone the project.
git clone https://github.com/infinitypaul/businessdate.git projectname

  1. Install dependencies via composer.
composer install 

  1. Run php server.
php artisan serve

<p>&nbsp;</p>

> You can also install the Application via Docker:

Pre-requisites

  • Docker running on the host machine.
  • Docker compose running on the host machine.
  1. Clone the project.
git clone https://github.com/infinitypaul/businessdate.git projectname

  1. Run the testrig.sh file on the Project Root Folder on your terminal/Command Prompt, This script does everything you need to run your this project. It starts up the servers, ensures the database is booted, installs dependencies. These services are exposed to your computer on the standard ports, then you can access your website on http:localhost

Troubleshooting

  • Port number might be already in use, change from `80` to another number in your `docker-compose.yml` file.
  • If you have any other issues, report them.

Enjoy!

Api Usage

> Using Get Request:

GET http://localhost/api/v1/businessDates/getBusinessDateWithDelay/<INITIAL DATE>/<DELAY>

> Using Post Request:

POST http://localhost/api/v1/businessDates/getBusinessDateWithDelay/

Where: * http://localhost/ is your Base Url, You Can Replace it with yours * INITIAL DATE, DELAY are variables that are used when calling the Date API. Example values for these are: * INITIAL DATE: 2018-5-14T10:10:10Z DELAY: 3

> Is Business Day:

Check if a date is a business date

GET http://localhost/api/v1/businessDates/isBusinessDay/<DATE>

License

The Find Your Service App is open-sourced software licensed under the MIT license


  Files folder image Files (82)  
File Role Description
Files folder image.scripts (1 file)
Files folder imageapp (1 file, 5 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (13 files)
Files folder imagedatabase (3 directories)
Files folder imagepublic (4 files, 2 directories)
Files folder imageresources (4 directories)
Files folder imageroutes (4 files)
Files folder imagetests (2 files, 2 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .env.example Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Plain text file artisan Class Class source
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file docker-compose.yml Data Auxiliary data
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file readme.md Doc. Documentation
Accessible without login Plain text file server.php Aux. Auxiliary script
Accessible without login Plain text file testrig.sh Data Auxiliary data
Accessible without login Plain text file webpack.mix.js Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:66
This week:0
All time:10,372
This week:206Up