A database stores dates as YYYY-MM-DD, but the invoice template wants DD/MM/YYYY. Given a string iso in the first format, return it in the second.
Examples
Input: iso = "2024-03-15"
Output: "15/03/2024"
Input: iso = "1999-12-31"
Output: "31/12/1999"
Constraints
isoalways has the formYYYY-MM-DDwith exactly 4, 2 and 2 digits
Goals
- Split a string on a separator
- Rearrange the pieces and join them with a different separator