ClassGo
DateInterval
Synopsis
class DateInterval {
- public int $y;
- public int $m;
- public int $d;
- public int $h;
- public int $i;
- public int $s;
- public int $invert;
- public float $f;
- public mixed $days;
- public function __construct(string $spec);
- public function format(string $layout): string;
- public static createFromDateString(string): mixed;
}
Description
DateInterval is a class phpscript declares.
$object = new DateInterval($spec);
Properties
public int $y-
The go field
Y. public int $m-
The go field
M. public int $d-
The go field
D. public int $h-
The go field
H. public int $i-
The go field
I. public int $s-
The go field
S. public int $invert-
The go field
Invert. public float $f-
The go field
F. public mixed $days-
Days is the total number of days of an interval diff() made, and false for one built from a spec.
The go field
Days.
Methods
public function format(string $layout): string-
format on an interval writes the %-directives of DateInterval::format().
The go method
Format.