You are here

function date_valid_year in Date 5.2

Same name and namespace in other branches
  1. 6.2 date_api.module \date_valid_year()
1 call to date_valid_year()
date_is_valid in ./date_api.module
Functions to test the validity of a date in various formats. Has special case for ISO dates and arrays which can be missing month and day and still be valid.

File

./date_api.module, line 1250
This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.

Code

function date_valid_year($year) {
  if (variable_get('date_max_year', 4000) < $year || variable_get('date_min_year', 1) > $year) {
    return FALSE;
  }
  else {
    return TRUE;
  }
}