My friend required some help with an assignment in school and I thought this would be a nice addition to be added as a challenge here as well.
Create a function that takes a sentence and returns a modified sentence abided by these rules:
smallFavor("I was born on 11/02/98")
➞ "I was born on 11/02/1998"
smallFavor("I was born on 11/02/98 and what about you?")
➞ "I was born on 11/02/1998 and what about you?"
smallFavor("I was born on 02.11.19")
➞ "I was born on 02.11.2019"
smallFavor("I was born on February, 02. 98.")
➞ "I was born on February, 02. 1998."
smallFavor("I was born on January, 01. 15. and today is October, 08. 20.")
➞ "I was born on January, 01. 2015. and today is October, 08. 2020."
smallFavor("I was born on Fakemonthy, 01. 15. dont change invalid dates")
➞ "I was born on Fakemonthy, 01. 15. dont change invalid dates"
Don't forget to apply the arbitrary year-prefix rule defined above.