Return true if the year recently changed (= it is January)
509753
protected boolean isJanuary() {
    if (TestHackHelper.isJUnitTest()) {
      return true;
    }
    return getCalendar().get(Calendar.MONTH) == Calendar.JANUARY;
  }
71056
def _is_leap_year(year):
    
    isleap = ((np.mod(year, 4) == 0) &
              ((np.mod(year, 100) != 0) | (np.mod(year, 400) == 0)))
    return isleap
1133566
def isFresh(self):
        ""
        max_age = self.getMaxAge()
        date = self.getDate()
        is_fresh = False
        if max_age and date:
            delta_time = datetime.now() - date
            is_fresh = delta_time.total_seconds() < max_age
        return is_fresh
36605
def changed(self, *value):
        """"""
        if self._last_checked_value != value:
            self._last_checked_value = value
            return True
        return False
1329315
def in_date(objet, pattern):
        
        if objet:
            pattern = re.sub(" ", '', pattern)
            objet_str = abstractRender.date(objet)
            return bool(re.search(pattern, objet_str))
        return False
894815
public function hasChanges(): bool
    {
        foreach ($this->getTables() as $table) {
            if ($table->getComparator()->hasChanges()) {
                return true;
            }
        }

        return false;
    }
772525
def check_if_modified_since(self, dt, etag=None):
        """"""
        dt = dt.replace(microsecond=0)
        if request.if_modified_since and dt <= request.if_modified_since:
            raise SameContentException(etag, last_modified=dt)
1229120
def during(self, year, month):
		""""""
		return self.filter(created__year=year, created__month=month)
1022132
def iso_year_start(iso_year):
    ""
    fourth_jan = datetime.date(iso_year, 1, 4)
    delta = datetime.timedelta(fourth_jan.isoweekday() - 1)
    return fourth_jan - delta
330137
private static boolean isIMMMonth(final Calendar cal) {
        final int month = cal.get(MONTH);

        switch (month) {
        case MARCH:
        case JUNE:
        case SEPTEMBER:
        case DECEMBER:
            return true;
        default:
            return false;
        }
    }
630991
def this_year(self):
        
        start_date, end_date = get_date_range_this_year()
        return self.filter(start_time__gte=start_date, start_time__lte=end_date)
1176905
def is_after(self, ts):
        '''  '''
        if self.timestamp >= int(calendar.timegm(ts.timetuple())):
            return True
        return False
854788
def has_changed (filename):
    """"""
    key = os.path.abspath(filename)
    mtime = get_mtime(key)
    if key not in _mtime_cache:
        _mtime_cache[key] = mtime
        return True
    return mtime > _mtime_cache[key]
843909
def changed(self):
        
        if self.explicit:
            return self.value != self.previous_value

        if isinstance(self.column, BaseContainerColumn):
            default_value = self.column.get_default()
            if self.column._val_is_null(default_value):
                return not self.column._val_is_null(self.value) and self.value != self.previous_value
            elif self.previous_value is None:
                return self.value != default_value

            return self.value != self.previous_value

        return False
774125
def this_year():
        
        since = TODAY
        while since.month != 3 or since.day != 1:
            since -= delta(days=1)
        until = since + delta(years=1)
        return Date(since), Date(until)
1134115
static boolean mayBeDate(String s) {
        if (s == null || s.length() != "yyyy-MM-dd_HH-mm-ss".length()) {
            return false;
        }
        for (int i = 0; i < s.length(); i++) {
            switch (s.charAt(i)) {
                case '-':
                    switch (i) {
                        case 4:
                        case 7:
                        case 13:
                        case 16:
                            break;
                        default:
                            return false;
                    }
                    break;
                case '_':
                    if (i != 10) {
                        return false;
                    }
                    break;
                case '0':
                case '1':
                    switch (i) {
                        case 4: // -
                        case 7: // -
                        case 10: // _
                        case 13: // -
                        case 16: // -
                            return false;
                        default:
                            break;
                    }
                    break;
                case '2':
                    switch (i) {
                        case 4: // -
                        case 5: // months 0-1
                        case 7: // -
                        case 10: // _
                        case 13: // -
                        case 16: // -
                            return false;
                        default:
                            break;
                    }
                    break;
                case '3':
                    switch (i) {
                        case 0: // year will safely begin with digit 2 for next 800-odd years
                        case 4: // -
                        case 5: // months 0-1
                        case 7: // -
                        case 10: // _
                        case 11: // hours 0-2
                        case 13: // -
                        case 16: // -
                            return false;
                        default:
                            break;
                    }
                    break;
                case '4':
                case '5':
                    switch (i) {
                        case 0: // year will safely begin with digit 2 for next 800-odd years
                        case 4: // -
                        case 5: // months 0-1
                        case 7: // -
                        case 8: // days 0-3
                        case 10: // _
                        case 11: // hours 0-2
                        case 13: // -
                        case 16: // -
                            return false;
                        default:
                            break;
                    }
                    break;
                case '6':
                case '7':
                case '8':
                case '9':
                    switch (i) {
                        case 0: // year will safely begin with digit 2 for next 800-odd years
                        case 4: // -
                        case 5: // months 0-1
                        case 7: // -
                        case 8: // days 0-3
                        case 10: // _
                        case 11: // hours 0-2
                        case 13: // -
                        case 14: // minutes 0-5
                        case 16: // -
                        case 17: // seconds 0-5
                            return false;
                        default:
                            break;
                    }
                    break;
                default:
                    return false;
            }
        }
        return true;
    }
768149
function isYearSeparator() {
    if (yearSeparator !== null) {
      return yearSeparator;
    }

    var formatter = makeFormatter({day: 'numeric', month: 'short', year: 'numeric'});
    if (formatter) {
      var output = formatter.format(new Date(0));
      yearSeparator = !!output.match(/\d,/);
      return yearSeparator;
    } else {
      return true;
    }
  }