Changing $maxdate param from integer to a string date format
Changing tests to the new format
All code sanitized at level PSR0