mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 14:50:39 -04:00
13 lines
481 B
PHP
13 lines
481 B
PHP
<?
|
|
namespace Exceptions;
|
|
|
|
use Safe\DateTimeImmutable;
|
|
|
|
class InvalidEbookCreatedDatetimeException extends AppException{
|
|
protected $message = 'Invalid EbookCreated datetime.';
|
|
|
|
public function __construct(DateTimeImmutable $createdDatetime){
|
|
$now = new DateTimeImmutable();
|
|
$this->message = 'Invalid EbookCreated datetime. ' . $createdDatetime->format('Y-m-d') . ' is not between ' . EBOOK_EARLIEST_CREATION_DATE->format('Y-m-d') . ' and ' . $now->format('Y-m-d') . '.';
|
|
}
|
|
}
|