Use the following problems to test your date and time programming prowess. I strongly encourage you to give each problem a try before you turn to the solutions and download the example programs:
- Converting a string to date and time: Write a program that exemplifies conversions between a string and date/time.
- Formatting date and time: Explain the format pattern for date and time.
- Getting the current date/time without time/date: Write a program that extracts the current date without the time or date.
- LocalDateTime from LocalDate and LocalTime: Write a program that builds a LocalDateTime from LocalDate object and LocalTime. It combines the date and time in a single LocalDateTime object.
- Machine time via an Instant class: Explain and give an example of the Instant API.
- Defining a period of time using date-based values (Period) and a duration of time using time-based values...