public static Datetime::formatExample($format)
Creates an example for a date format.
This is centralized for a consistent method of creating these examples.
Parameters
string $format:
Return value
string
File
- core/lib/Drupal/Core/Datetime/Element/Datetime.php, line 372
Class
- Datetime
- Provides a datetime element.
Namespace
Drupal\Core\Datetime\Element
Code
public static function formatExample($format) { if (!static::$dateExample) { static::$dateExample = new DrupalDateTime(); } return static::$dateExample->format($format); }
Please login to continue.