Here are the problem-solving sections for this chapter.
Write a function that can measure the execution time of a function (with any number of arguments) in any required duration (such as seconds, milliseconds, microseconds, and so on).
Write a function that, given two dates, returns the number of days between the two dates. The function should work regardless of the order of the input dates.
Write a function that, given a date, determines the day of the week. This function should return a value between 1 (for Monday) and 7 (for Sunday).
Write a function that, given a date, returns the day of the year (from 1 to 365 or 366 for leap years) and another function that, for the same input, returns the calendar week of the year.