function birthday_from_id_card(string $number) { $b = substr($number, 6, 8); return substr($b, 0, 4) . '-' . substr($b, 4, 2) . '-' . substr($b, 6, 2); } Was this helpful? YesNo 0 / 0