In this exercise you'll be working on an appointment scheduler for a beauty salon in New York that opened on September 15th in 2012.
You have five tasks, which will all involve appointment dates. Times are in 24-hour clock format (no AM/PM).
Implement the schedule_appointment() function to parse a textual representation of an appointment date into the corresponding DateTime format.
Note that the input is in U.S.-style month/day/year order.
julia> schedule_appointment("07/25/2023 13:45:00")
2023-07-25T13:45:00Implement the has_passed() function that takes an appointment date and checks if the appointment was somewhere in the past:
julia> has_passed(DateTime(1999, 12, 31, 9, 0, 0))
trueImplement the is_afternoon_appointment() function that takes an appointment date and checks if the appointment is in the afternoon (>= 12:00 and < 18:00):
julia> is_afternoon_appointment(DateTime(2023, 3, 29, 15, 0, 0))
trueImplement the description() function that takes an appointment date and returns a description of that date and time:
julia> describe(DateTime(2023, 3, 29, 15, 0, 0))
"You have an appointment on Wednesday, March 29, 2023 at 15:00"Implement the anniversary_date() function that returns this year's anniversary date, which is September 15th:
julia> anniversary_date() # run during 2025
2025-09-15In this exercise you'll be working on an appointment scheduler for a beauty salon in New York that opened on September 15th in 2012.
You have five tasks, which will all involve appointment dates. Times are in 24-hour clock format (no AM/PM).
Implement the schedule_appointment() function to parse a textual representation of an appointment date into the corresponding DateTime format.
Note that the input is in U.S.-style month/day/year order.
julia> schedule_appointment("07/25/2023 13:45:00")
2023-07-25T13:45:00Implement the has_passed() function that takes an appointment date and checks if the appointment was somewhere in the past:
julia> has_passed(DateTime(1999, 12, 31, 9, 0, 0))
trueImplement the is_afternoon_appointment() function that takes an appointment date and checks if the appointment is in the afternoon (>= 12:00 and < 18:00):
julia> is_afternoon_appointment(DateTime(2023, 3, 29, 15, 0, 0))
trueImplement the description() function that takes an appointment date and returns a description of that date and time:
julia> describe(DateTime(2023, 3, 29, 15, 0, 0))
"You have an appointment on Wednesday, March 29, 2023 at 15:00"Implement the anniversary_date() function that returns this year's anniversary date, which is September 15th:
julia> anniversary_date() # run during 2025
2025-09-15