is_valid_date Function

public pure function is_valid_date(date)

Arguments

Type IntentOptional Attributes Name
type(date_fields), intent(in) :: date

Return Value logical


Calls

proc~~is_valid_date~2~~CallsGraph proc~is_valid_date~2 is_valid_date proc~get_month_end get_month_end proc~is_valid_date~2->proc~get_month_end proc~is_between is_between proc~is_valid_date~2->proc~is_between proc~is_valid_month is_valid_month proc~is_valid_date~2->proc~is_valid_month proc~is_valid_year is_valid_year proc~is_valid_date~2->proc~is_valid_year proc~get_month_ends get_month_ends proc~get_month_end->proc~get_month_ends proc~is_valid_month->proc~is_between proc~is_valid_year->proc~is_between proc~is_leap_year~2 is_leap_year proc~get_month_ends->proc~is_leap_year~2

Called by

proc~~is_valid_date~2~~CalledByGraph proc~is_valid_date~2 is_valid_date proc~parse_date parse_date proc~parse_date->proc~is_valid_date~2 proc~test_is_valid_date test_is_valid_date proc~test_is_valid_date->proc~is_valid_date~2 proc~construct_iso8601date construct_ISO8601Date proc~construct_iso8601date->proc~parse_date proc~test_parse_date test_parse_date proc~test_parse_date->proc~parse_date interface~iso8601date ISO8601Date interface~iso8601date->proc~construct_iso8601date

Source Code

   pure logical function is_valid_date(date)
      type(date_fields), intent(in) :: date
      integer, parameter :: LB_DAY = 0

      is_valid_date = is_valid_year(date%year_) .and. &
         is_valid_month(date%month_) .and. &
         is_between(LB_DAY, get_month_end(date%year_, date%month_)+1, date%day_)

   end function is_valid_date