1. Learn
  2. /
  3. Courses
  4. /
  5. Cleaning Data in Java

Connected

Exercise

Validating date ranges

You have validated the numeric ranges of the video game sales quantities. Now you need to validate the ranges of the video game release dates. The dates should fall between 1/1/1985 and 12/31/2024. Sample dates have been extracted from the dataset below. Set up date range checks on this data.

Game Platform Release date Quantity (millions of units)
Wii Sports Wii 11/19/2006 41.49
Super Mario Bros. NES 11/13/1985 29.08
Mario Kart Wii Wii 4/10/2008 15.85

The necessary packages such as LocalDate, and DateTimeFormatter have been imported for you.

Instructions

100 XP
  • Check that the release date occurs after startDate.
  • Verify that the release date is before endDate.