Adapted Date class and changed methods to PSR standard