### Question:
DateUtils { public static boolean dateIsValid( String dateString ) { return dateIsValid( PeriodType.getCalendar(), dateString ); }  static String getIso8601( Date date ); static String getIso8601NoTz( Date date ); static String getLongGmtDateString( Date date ); static String getLongDateString( Date date ); static String getLongDateString(); static String getMediumDateString( Date date ); static String getMediumDateString(); static String getHttpDateString( Date date ); static Date max( Date date1, Date date2 ); static Date max( Collection<Date> dates ); static Date min( Date date1, Date date2 ); static Date min( Collection<Date> dates ); static Date getMediumDate( String string ); static boolean between( Date baseDate, Date startDate, Date endDate ); static boolean strictlyBetween( Date baseDate, Date startDate, Date endDate ); static long getDays( Date date ); static long getDays( Date startDate, Date endDate ); static long getDaysInclusive( Date startDate, Date endDate ); static int daysBetween( Date startDate, Date endDate ); static boolean isToday( Date date ); static int monthsBetween( Date startDate, Date endDate ); static int daysSince1900( Date date ); static Date getNextDate( int hourOfDay, Date now ); static Date getEpoch(); static String getSqlDateString( Date date ); static boolean dateIsValid( String dateString ); static boolean dateIsValid( org.hisp.dhis.calendar.Calendar calendar, String dateString ); static boolean dateTimeIsValid( final String dateTimeString ); static long getSecondsUntilTomorrow( int hour ); static Date getDateForTomorrow( int hour ); static Date getDateAfterAddition( Date date, int days ); static Date calculateDateFrom( final Date date, final int addend, final int chronoUnit ); static List<Period> setNames( List<Period> periods, I18nFormat format ); static String getPrettyInterval( Date start, Date end ); static String getPrettyInterval( long ms ); static Date parseDate( final String dateString ); static Date getDate( LocalDateTime time ); static Date nowMinusDuration( String duration ); static Duration getDuration( String duration ); static Timestamp asTimestamp( Date date ); static java.sql.Date asSqlDate( Date date ); static Date getLatest( Date... dates ); static Date removeTimeStamp( Date date ); static final PeriodFormatter DAY_SECOND_FORMAT; static final double DAYS_IN_YEAR; }### Answer:
@Test public void testDateIsValid() { assertTrue( dateIsValid( "2000-01-01" ) ); assertTrue( dateIsValid( "1067-04-28" ) ); assertFalse( dateIsValid( "07-07-2000" ) ); assertFalse( dateIsValid( "2000-03-40" ) ); assertFalse( dateIsValid( "20d20-03-01" ) ); assertTrue( dateIsValid( "2014-01-01" ) ); assertFalse( dateIsValid( "2014-12-33" ) ); assertFalse( dateIsValid( "2014-13-32" ) ); assertFalse( dateIsValid( "2014-ab-cd" ) ); assertFalse( dateIsValid( "201-01-01" ) ); assertFalse( dateIsValid( "01-01-01" ) ); assertFalse( dateIsValid( "abcd-01-01" ) ); assertFalse( dateIsValid( "2017-04-31" ) ); assertFalse( dateIsValid( "2017-04-32" ) ); assertFalse( dateIsValid( "2016-09-31" ) ); assertTrue( dateIsValid( NepaliCalendar.getInstance(), "2074-04-32" ) ); assertFalse( dateIsValid( NepaliCalendar.getInstance(), "2074-03-32" ) ); assertFalse( dateIsValid( NepaliCalendar.getInstance(), "2074-04-33" ) ); }