Question: Python 3 Given a date string in the format Day Month Year, where: Day is in the set( 1st, 2nd, 3rd, 4th, 5th, 6th, 7th,

Python 3

Python 3 Given a date string in the format Day Month Year,

Given a date string in the format Day Month Year, where: Day is in the set(" 1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", Month is in the set f"Jan", "Feb", "Mar, Apr", "May Jun", "Jul", Aug". "Sep", "Oct", "Nov", "Dec" Year is in the inclusive range [1900, 2100] , "29th", "30th", "31st") . Convert the date string to the format YYYY-MM-DD, where: YWY denotes the 4 digit year. MM denotes the 2 digit month. DD denotes the 2 digit day For example 1st Mar 1984-1984-03-01 2nd Feb 2013- 2013-02-02 4th Apr 1900 1900-04-04 Function Description Complete the function reformatDate in the editor below. The function must return an array of converted date strings in the order presented reformatDate has the following parameter(s) dates(dates(0.)...dates(n-1): an array of date strings in the format Day Month Year Constraints The values of Day, Month, and Year are restricted to the value ranges specified above. The given dates are guaranteed to be valid, so no error handling is necessary. . 1sns 104

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!