Function __global->date
Definitions
sources_custom/phpstub.php
- Format a local time/date.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $format | string | No | No | required parameter | N/A | N/A | The format string |
| $timestamp | ?TIME | No | No | Null | N/A | N/A | The timestamp (null: current time) |
Returns
- The string representation of the local time/date
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Format a local time/date.
*
* @param string $format The format string
* @param ?TIME $timestamp The timestamp (null: current time)
* @return string The string representation of the local time/date
*/
function date(string $format, ?int $timestamp = null) : string
* Format a local time/date.
*
* @param string $format The format string
* @param ?TIME $timestamp The timestamp (null: current time)
* @return string The string representation of the local time/date
*/
function date(string $format, ?int $timestamp = null) : string
