new Date()
Class constructor
new Date(string|int|DateTimeInterface $datetime = 'now', DateTimeZone|null $timezone = null)
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $datetime | stringorintorDateTimeInterface |
'now'
|
Datetime string, UNIX timestamp or object |
| $timezone | DateTimeZoneornull |
null
|
Optional default timezone if $datetime is string |