Problems
Here are the problem-solving sections for this chapter.
39. Measuring function execution time
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).
40. Number of days between two dates
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.
41. Day of the week
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).
42. Day and week of the year
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.
43. Meeting time for multiple time zones
Write a function that, given a list of meeting participants and their time zones, displays the local meeting...