<Enabled>true|false</Enabled>
    <Days>number-of-days</Days>
1110
def _convert_xml_to_retention_policy(xml, retention_policy):
    '''
    
    '''
    # Enabled
    retention_policy.enabled = _bool(xml.find('Enabled').text)

    # Days
    days_element = xml.find('Days')
    if days_element is not None:
        retention_policy.days = int(days_element.text)
1121887
@Override
    public boolean isNonWorkingDay(final E date) {
        if (date != null && (holidayCalendar.getEarlyBoundary() != null || holidayCalendar.getLateBoundary() != null)) {
            checkBoundary(date);
        }
        return isWeekend(date) || holidayCalendar.isHoliday(date);
    }
387380
public boolean isSet() {
    for (int i = 0; i < counts.length; ++i) {
      if (counts[i] != 0) {
        return true;
      }
    }
    return false;
  }
779803
public void setDaysExcluded (final boolean [] days)
  {
    if (days == null)
    {
      throw new IllegalArgumentException ("The days parameter cannot be null.");
    }

    if (days.length < MAX_DAYS_IN_MONTH)
    {
      throw new IllegalArgumentException ("The days parameter must have a length of at least " +
                                          MAX_DAYS_IN_MONTH +
                                          " elements.");
    }

    m_aExcludeDays = days;
    m_aExcludeAll = areAllDaysExcluded ();
  }
218565
public static int dayOfWeek(long day) {
        long[] remainder = new long[1];
        floorDivide(day + 5 /* Calendar.THURSDAY */, 7, remainder);
        int dayOfWeek = (int)remainder[0];
        dayOfWeek = (dayOfWeek == 0) ? 7 : dayOfWeek;
        return dayOfWeek;
    }
1213206
public static boolean isLastDayOfTheMonth(final Date date) {

    Date dateOfMonthsBack = getDateOfMonthsBack(-1, date);
    int dayOfMonth = getDayOfMonth(dateOfMonthsBack);
    Date dateOfDaysBack = getDateOfDaysBack(dayOfMonth, dateOfMonthsBack);
    return dateOfDaysBack.equals(date);
  }
364506
def days(self):
        """"""
        monday = self.day(0)
        return [monday + timedelta(days=i) for i in range(7)]
165115
public D minus(CalendarDays days) {

        return this.plus(CalendarDays.of(Math.negateExact(days.getAmount())));

    }
1178369
def hasMealsFor(self, date):
        
        date = self._handleDate(date)
        if date not in self._days or self._days[date] is False:
            return False
        return len(self._days[date]) > 0
1129933
public static boolean isBirthday(int year, int month, int day) {
		// 验证年
		int thisYear = DateUtil.thisYear();
		if (year < 1900 || year > thisYear) {
			return false;
		}

		// 验证月
		if (month < 1 || month > 12) {
			return false;
		}

		// 验证日
		if (day < 1 || day > 31) {
			return false;
		}
		if ((month == 4 || month == 6 || month == 9 || month == 11) && day == 31) {
			return false;
		}
		if (month == 2) {
			if (day > 29 || (day == 29 && false == DateUtil.isLeapYear(year))) {
				return false;
			}
		}
		return true;
	}
954579
private void readDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay day, boolean readExceptionsFromDays)
   {
      BigInteger dayType = day.getDayType();
      if (dayType != null)
      {
         if (dayType.intValue() == 0)
         {
            if (readExceptionsFromDays)
            {
               readExceptionDay(calendar, day);
            }
         }
         else
         {
            readNormalDay(calendar, day);
         }
      }
   }
261992
def deadline=(days)
      unless days == NO_DEADLINE
        days = JSS::Validate.integer(days)
        days = NO_DEADLINE unless days.positive?
      end
      return if days == deadline
      @deadline = days
      @need_to_update = true
    end
495956
function(opts, day, abbr)
    {
        day += opts.firstDay;
        while (day >= 7) {
            day -= 7;
        }
        return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];
    }
190157
public final void setWholeDay(Boolean isWholeDay) {

        m_isWholeDay = (null != isWholeDay) && isWholeDay.equals(Boolean.TRUE);

    }
457616
public boolean inThisDay(Date theTargetDate) {
		Date[] thisDay = asDayRange();
		return theTargetDate.compareTo(thisDay[0]) >= 0 && theTargetDate.compareTo(thisDay[1]) <= 0;
	}
957950
public boolean isEnabled() {
        if (daysOfWeek != null && daysOfWeek.length > 0) {
            return true;
        }
        if (timesOfDay != null && timesOfDay.size() > 0) {
            return true;
        }
        return false;
    }
520941
public static boolean isSameDay(Calendar dayOne, Calendar dayTwo) {
        return dayOne.get(Calendar.YEAR) == dayTwo.get(Calendar.YEAR) && dayOne.get(Calendar.DAY_OF_YEAR) == dayTwo.get(Calendar.DAY_OF_YEAR);
    }