DateGuard
in package
FinalYes
Проверка календарной даты ISO (YYYY-MM-DD) без обращений к статическим часам.
Table of Contents
Properties
- $days : array<int, int>
Methods
- assertIso() : void
- isLeap() : bool
- number() : int
Properties
$days
private
array<int, int>
$days
= [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
Methods
assertIso()
public
assertIso(string $date) : void
Parameters
- $date : string
Tags
isLeap()
private
isLeap(int $year) : bool
Parameters
- $year : int
Return values
boolnumber()
private
number(string $piece) : int
Parameters
- $piece : string