Suppose there is a given date, 2002-03-01 (YYYY-MM-DD). How can you get the day (2002-02-28 ) before the given date and check that it is valid?