forked from vinkla/extended-acf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDateTimeFormat.php
More file actions
33 lines (26 loc) · 821 Bytes
/
DateTimeFormat.php
File metadata and controls
33 lines (26 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Copyright (c) Vincent Klaiber.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @see https://github.com/wordplate/extended-acf
*/
declare(strict_types=1);
namespace WordPlate\Acf\Fields\Settings;
trait DateTimeFormat
{
/** @see https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.format-parameters */
public function displayFormat(string $format): static
{
$this->settings['display_format'] = $format;
return $this;
}
/** @see https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.format-parameters */
public function returnFormat(string $format): static
{
$this->settings['return_format'] = $format;
return $this;
}
}