Question: Write a program that reads a date from input as string in the form mm / dd / yyyy and then converts and displays the

Write a program that reads a date from input as string in the form mm/dd/yyyy and then converts and displays the date as
its long form
its international short form
For example, if the date entered is 10/03/2024, its long form is October 3,2024 and its its international short form is 03-10-24.
Program Details
Your program must have a dateLongForm function that takes a date as a string (in the form mm/dd/yyyy ) and it returns the date in the its long form. For example, dateLongForm("10/03/2024") would return "October 3,2024"
Your program must have a internationalShortForm function that takes a date as a string (in the form mm/dd/yyyy ) and it returns the date in the its international short form. For example, internationalShortForm("10/03/2024") would return "03-10-24"
You may assume the user will always give a correctly formatted date.
Hints:
You may find slicing (string[start:end]) and conditionals useful to solve this prob

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!