Skip to content

Commit c4268a7

Browse files
mychidarkogithub-actions[bot]
authored andcommitted
chore: fix styling
1 parent 5ee2540 commit c4268a7

1 file changed

Lines changed: 71 additions & 71 deletions

File tree

src/Date.php

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -382,75 +382,75 @@ public function isBefore($date): bool
382382
return $this->date < ($date instanceof DateTime ? $date : new DateTime(str_replace('/', '-', $date)));
383383
}
384384

385-
/**
386-
* This indicates whether the date object is after the other supplied date-time.
387-
*/
388-
public function isAfter($date): bool
389-
{
390-
return !$this->isBefore($date) && !$this->isSame($date);
391-
}
392-
393-
/**
394-
* This indicates whether the date object is between the other supplied date-time.
395-
*/
396-
public function isBetween($date1 = 'now', $date2 = 'now'): bool
397-
{
398-
return $this->isAfter($date1) && $this->isBefore($date2);
399-
}
400-
401-
/**
402-
* This indicates whether the date object is between the other supplied date-time.
403-
*/
404-
public function isBetweenOrEqual($date1 = 'now', $date2 = 'now'): bool
405-
{
406-
return $this->isAfter($date1) && $this->isBefore($date2) || $this->isSame($date1) || $this->isSame($date2);
407-
}
408-
409-
/**
410-
* This indicates whether the date object is the same as the other supplied date-time.
411-
*/
412-
public function isSame($date = 'now'): bool
413-
{
414-
return $this->date == ($date instanceof DateTime ? $date : new DateTime(str_replace('/', '-', $date)));
415-
}
416-
417-
/**
418-
* This indicates whether the date object is the same as the other supplied date-time.
419-
*/
420-
public function isSameDay($date = 'now'): bool
421-
{
422-
return $this->date->format('Y-m-d') === ($date instanceof DateTime ? $date : new DateTime(str_replace('/', '-', $date)))->format('Y-m-d');
423-
}
424-
425-
/**
426-
* This indicates whether the date object is the same as the other supplied date-time.
427-
*/
428-
public function isSameMonth($date = 'now'): bool
429-
{
430-
return $this->date->format('Y-m') === ($date instanceof DateTime ? $date : new DateTime(str_replace('/', '-', $date)))->format('Y-m');
431-
}
432-
433-
/**
434-
* This indicates whether the date object is the same as the other supplied date-time.
435-
*/
436-
public function isSameYear($date = 'now'): bool
437-
{
438-
return $this->date->format('Y') === ($date instanceof DateTime ? $date : new DateTime(str_replace('/', '-', $date)))->format('Y');
439-
}
440-
441-
/**
442-
* This indicates whether the date object is a leap year.
443-
*/
444-
public function isLeapYear(): bool
445-
{
446-
return (int) $this->date->format('L') === 1;
447-
}
448-
449-
/**
450-
* This indicates whether the date object is a datetime
451-
*/
452-
public function isDateTime($date): bool
453-
{
454-
return $date instanceof DateTime;
455-
}
385+
/**
386+
* This indicates whether the date object is after the other supplied date-time.
387+
*/
388+
public function isAfter($date): bool
389+
{
390+
return !$this->isBefore($date) && !$this->isSame($date);
391+
}
392+
393+
/**
394+
* This indicates whether the date object is between the other supplied date-time.
395+
*/
396+
public function isBetween($date1 = 'now', $date2 = 'now'): bool
397+
{
398+
return $this->isAfter($date1) && $this->isBefore($date2);
399+
}
400+
401+
/**
402+
* This indicates whether the date object is between the other supplied date-time.
403+
*/
404+
public function isBetweenOrEqual($date1 = 'now', $date2 = 'now'): bool
405+
{
406+
return $this->isAfter($date1) && $this->isBefore($date2) || $this->isSame($date1) || $this->isSame($date2);
407+
}
408+
409+
/**
410+
* This indicates whether the date object is the same as the other supplied date-time.
411+
*/
412+
public function isSame($date = 'now'): bool
413+
{
414+
return $this->date == ($date instanceof DateTime ? $date : new DateTime(str_replace('/', '-', $date)));
415+
}
416+
417+
/**
418+
* This indicates whether the date object is the same as the other supplied date-time.
419+
*/
420+
public function isSameDay($date = 'now'): bool
421+
{
422+
return $this->date->format('Y-m-d') === ($date instanceof DateTime ? $date : new DateTime(str_replace('/', '-', $date)))->format('Y-m-d');
423+
}
424+
425+
/**
426+
* This indicates whether the date object is the same as the other supplied date-time.
427+
*/
428+
public function isSameMonth($date = 'now'): bool
429+
{
430+
return $this->date->format('Y-m') === ($date instanceof DateTime ? $date : new DateTime(str_replace('/', '-', $date)))->format('Y-m');
431+
}
432+
433+
/**
434+
* This indicates whether the date object is the same as the other supplied date-time.
435+
*/
436+
public function isSameYear($date = 'now'): bool
437+
{
438+
return $this->date->format('Y') === ($date instanceof DateTime ? $date : new DateTime(str_replace('/', '-', $date)))->format('Y');
439+
}
440+
441+
/**
442+
* This indicates whether the date object is a leap year.
443+
*/
444+
public function isLeapYear(): bool
445+
{
446+
return (int) $this->date->format('L') === 1;
447+
}
448+
449+
/**
450+
* This indicates whether the date object is a datetime
451+
*/
452+
public function isDateTime($date): bool
453+
{
454+
return $date instanceof DateTime;
455+
}
456456
}

0 commit comments

Comments
 (0)