Determine if a data record is of type YEAR.
766829
def is_year(self):
        """"""
        dt = DATA_TYPES['year']
        if dt['min'] and dt['max']:
            if type(self.data) is dt['type'] and dt['min'] < self.data < dt['max']:
                self.type = 'year'.upper()
                self.len = None
                return True
697214
private boolean containsDate(String[] strs, int tolerance)
    {
        dfirst = -1;
        dlast = -1;
        int lastdw = -999;
        int lastnum = -999;
        int lastyear = -999;
        for (int i = 0; i < strs.length; i++)
        {
            if (isMonthName(strs[i]))
            {
                lastdw = i;
                if (lastdw - lastnum <= tolerance)
                    return true;
            }
            else if (isYear(strs[i]))
            {
                lastyear = i;
                if (lastyear - lastnum <= tolerance)
                    return true;
            }
            else if (isNum(strs[i]))
            {
                lastnum = i;
                if (lastnum - lastdw <= tolerance)
                    return true;
            }
        }
        return false;
    }
250771
public final void showYear(Year year) {
        requireNonNull(year);
        if (!yearPage.isHidden()) {
            selectedPage.set(getYearPage());
            setDate(year.atDay(1));
        }
    }
959042
def is_timestamp(instance):
    """"""
    if not isinstance(instance, (int, str)):
        return True
    return datetime.fromtimestamp(int(instance))
161005
public boolean recordTypedef(JSTypeExpression type) {
    if (type != null && !hasAnyTypeRelatedTags() && currentInfo.declareTypedefType(type)) {
      populated = true;
      return true;
    }
    return false;
  }
320789
private static int getYear(CSLDate date, CSLDateParser dateParser) {
		if (date == null) {
			return -1;
		}
		if (date.getDateParts() == null ||
				date.getDateParts().length == 0 ||
				date.getDateParts()[0] == null ||
				date.getDateParts()[0].length == 0) {
			if (date.getRaw() != null && !date.getRaw().isEmpty()) {
				CSLDate d = dateParser.parse(date.getRaw());
				return getYear(d, dateParser);
			}
			return -1;
		}
		return date.getDateParts()[0][0];
	}
1150052
public static Date dateReservedYear(int year, boolean is000) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.YEAR, year);

        return is000 ? dateReservedYear000(calendar) : dateReservedYear999(calendar);
    }
1004085
def db_type
      # first, detect any character not number
      case
      when @data.any? { |v| v.to_s =~ DATE_REGEXP }
        'DATE'
      when @data.any? { |v| v.to_s =~ /[^0-9e.-]/ }
        'VARCHAR (255)'
      when @data.any? { |v| v.to_s =~ /\./ }
        'DOUBLE'
      else
        'INTEGER'
      end
    end
1255942
def datatype(dbtype, description, cursor):
    """"""
    dt = cursor.db.introspection.get_field_type(dbtype, description)
    if type(dt) is tuple:
        return dt[0]
    else:
        return dt
133238
def _check_stringify_year_column(self, column_index):
        '''
        
        '''
        table_column = TableTranspose(self.table)[column_index]
        # State trackers
        prior_year = None
        for row_index in range(self.start[0]+1, self.end[0]):
            current_year = table_column[row_index]
            if not self._check_years(current_year, prior_year):
                return
            # Only copy when we see a non-empty entry
            if current_year:
                prior_year = current_year

        # If we have a title of years, convert them to strings
        self._stringify_column(column_index)
1011941
def _isvalid(self, datatype):
        ''''''
        if datatype in self.meta:
            return bool(Dap._meta_valid[datatype].match(self.meta[datatype]))
        else:
            return datatype in Dap._optional_meta
338621
public String getYear(int type)
	{
		if (allow(type&ID3V1))
		{
			return id3v1.getYear();
		}
		if (allow(type&ID3V2))
		{
			return id3v2.getFrameDataString(ID3v2Frames.YEAR);
		}
		return null;
	}
65718
def _sp_type(self, key, value):
        """"""
        try:
            field_type = self._disp_cols[key]['type']
            if field_type in ['Number', 'Currency']:
                return value
            elif field_type == 'DateTime':
                return value.strftime('%Y-%m-%d %H:%M:%S')
            elif field_type == 'Boolean':
                if value == 'Yes':
                    return '1'
                elif value == 'No':
                    return '0'
                else:
                    raise Exception("%s not a valid Boolean Value, only 'Yes' or 'No'" % value)
            elif field_type == 'User':
                return self.users['py'][value]
            else:
                return value
        except AttributeError:
            return value
549326
function isBuildInType(type) {
        return type === Function
            || type === String
            || type === Boolean
            || type === Number
            || type === RegExp
            || type === Object
            || type === Array
            || type === Date
    }
71056
def _is_leap_year(year):
    
    isleap = ((np.mod(year, 4) == 0) &
              ((np.mod(year, 100) != 0) | (np.mod(year, 400) == 0)))
    return isleap
1131777
def is_annual(self):
        """"""
        if (self.st_month, self.st_day, self.st_hour, self.end_month,
                self.end_day, self.end_hour) == (1, 1, 0, 12, 31, 23):
                    return True
        else:
            return False
270231
def _guess_type(val):
        """"""
        if isinstance(val, bool):
            return "choice"
        elif isinstance(val, int):
            return "number"
        elif isinstance(val, float):
            return "number"
        elif isinstance(val, str):
            return "text"
        elif hasattr(val, 'read'):
            return "file"
        else:
            return "text"