mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Add Temporal::utc() shorthand to Temporal::convert()
This commit is contained in:
parent
ca8209a2ce
commit
35d06bd9eb
22 changed files with 173 additions and 128 deletions
|
@ -218,10 +218,11 @@ function profiles_post(App $a) {
|
|||
$ignore_year = true;
|
||||
$dob = substr($dob, 5);
|
||||
}
|
||||
$dob = Temporal::convert((($ignore_year) ? '1900-' . $dob : $dob), 'UTC', 'UTC', (($ignore_year) ? 'm-d' : 'Y-m-d'));
|
||||
|
||||
if ($ignore_year) {
|
||||
$dob = '0000-' . $dob;
|
||||
$dob = '0000-' . Temporal::utc('1900-' . $dob, 'm-d');
|
||||
} else {
|
||||
$dob = Temporal::utc($dob, 'Y-m-d');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue