A little CLI utility written in php. It's a demonstration of my programming skills as part of an internship application.
The utility determines at what dates a fictional company should pay its sales staff according to the following rules:
- Sales staff get a regular monthly fixed base salary and a monthly bonus.
- The base salaries are paid on the last day of the month unless that day is a Saturday or a Sunday (weekend)
- On the 15th of every month bonuses are paid for the previous month, unless that day is a weekend. In that case, they are paid the first Wednesday after the 15th
This info gets written to a .csv file the user specifies.
Note That my app actually fails rule #3: it provides the bonus payday for this month.
- PHP 5.6 or higher (>= 7.0 recommended)
- Composer installed
- Clone this repo
- Run
$ composer update
-
Open project root
-
Run
$ php app/console.php dates:payday <filename>
Replace
<filename>
with a filename of your choosing. The .csv isn't necessary.