<Enabled>true|false</Enabled>
    <Days>number-of-days</Days>
180604
def _convert_retention_policy_to_xml(retention_policy, root):
    '''
    
    '''
    # Enabled
    ETree.SubElement(root, 'Enabled').text = str(retention_policy.enabled)

    # Days
    if retention_policy.enabled and retention_policy.days:
        ETree.SubElement(root, 'Days').text = str(retention_policy.days)
884391
function countDays (koyomi, firstDay, length) {
  var days = 0;
  var d = firstDay;
  while(length--){
    if (koyomi.isOpen(d)) {
      days++;
    }
    d.setTime(d.getTime() + A_DAY);
  }
  return days;
}
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
455480
boolean check(Calendar cal) {

        Calendar checkCal = cal;

        if(specTimezone != null && !specTimezone.isEmpty()) {
            Calendar tzCal = Calendar.getInstance(TimeZone.getTimeZone(specTimezone));
            tzCal.setTime(cal.getTime());
            checkCal = tzCal;
        }

        if(!checkBits(bits[0],checkCal.get(MINUTE)))
            return false;
        if(!checkBits(bits[1],checkCal.get(HOUR_OF_DAY)))
            return false;
        if(!checkBits(bits[2],checkCal.get(DAY_OF_MONTH)))
            return false;
        if(!checkBits(bits[3],checkCal.get(MONTH)+1))
            return false;
        if(!checkBits(dayOfWeek,checkCal.get(Calendar.DAY_OF_WEEK)-1))
            return false;

        return true;
    }
150269
private boolean matchesDay(DateTime currentTime, TimeRestrictedAccess filter) {
        Integer dayStart = filter.getDayStart();
        Integer dayEnd = filter.getDayEnd();
        int dayNow = currentTime.getDayOfWeek();
        if (dayStart >= dayEnd) {
            return dayNow >= dayStart && dayNow <= dayEnd;
        } else {
            return dayNow <= dayEnd && dayNow >= dayStart;
        }
    }
476536
int getDayOfWeek(Calendar calendar) {
        int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK) - firstDayOfWeekToDraw;
        dayOfWeek = dayOfWeek < 0 ? 7 + dayOfWeek: dayOfWeek;
        return dayOfWeek;
    }
708901
public function getDays($total = false)
    {
        return ($total == true) ? $this->getInterval()->days : $this->getInterval()->d;
    }
1132933
function getFutureDays(days) {
    var now = new Date();
    now.setTime(now.getTime() + (days * 24 * 60 * 60 * 1000));
    return now;
}
790368
final boolean hasNoMajorSolarTerm(long utcDays) {
        double jd0 = JulianDay.ofEphemerisTime(this.midnight(utcDays)).getValue();
        int index0 = (2 + (int) Math.floor(SolarTerm.solarLongitude(jd0) / 30)) % 12;
        double jd1 = JulianDay.ofEphemerisTime(this.midnight(this.newMoonOnOrAfter(utcDays + 1))).getValue();
        int index1 = (2 + (int) Math.floor(SolarTerm.solarLongitude(jd1) / 30)) % 12;
        return (index0 == index1);
    }
603861
def is_required_day?(time, day)
			day_to_ask = "#{day}?"
			result = eval("time.#{day_to_ask}") if time.respond_to? day_to_ask.to_sym
			return result
		end
836209
def on(self, day, strict=False):
        
        day_start, day_stop = day.floor('day').span('day')
        if strict:
            return self.included(day_start, day_stop)
        else:
            return self.overlapping(day_start, day_stop)
44665
function isDayBefore(d1, d2) {
  var day1 = clone(d1).setHours(0, 0, 0, 0);
  var day2 = clone(d2).setHours(0, 0, 0, 0);
  return day1 < day2;
}
1064670
private static boolean isWorkingDay(Calendar cal) {
		return cal.get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY && cal.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY
				&& !isHoliday(cal);
	}
660126
function(d) {
		"use strict";

		if (this.options.weekStartOnMonday === false) {
			return d.getDay();
		}
		return d.getDay() === 0 ? 6 : (d.getDay()-1);
	}
8961
public boolean isExceptionToday() {
        if (daysOfWeek != null && daysOfWeek.length > 0) {
            int dayOfWeekNow = Calendar.getInstance().get(Calendar.DAY_OF_WEEK);
            for (int exceptionDay : daysOfWeek) {
                if (exceptionDay == dayOfWeekNow) {
                    return true;
                }
            }
        }
        return false;
    }
42055
private boolean isWorkingDay(ProjectCalendar mpxjCalendar, Day day)
   {
      boolean result = false;
      net.sf.mpxj.DayType type = mpxjCalendar.getWorkingDay(day);
      if (type == null)
      {
         type = net.sf.mpxj.DayType.DEFAULT;
      }

      switch (type)
      {
         case WORKING:
         {
            result = true;
            break;
         }

         case NON_WORKING:
         {
            result = false;
            break;
         }

         case DEFAULT:
         {
            if (mpxjCalendar.getParent() == null)
            {
               result = false;
            }
            else
            {
               result = isWorkingDay(mpxjCalendar.getParent(), day);
            }
            break;
         }
      }

      return (result);
   }
1161258
public function isAllDay()
    {
        if ($this->AllDay) {
            return true;
        }

        $secsInDay = 60 * 60 * 24;
        $startTime = strtotime($this->StartDateTime);
        $endTime = strtotime($this->EndDateTime);

        if (($endTime - $startTime) > $secsInDay) {
            return true;
        }
    }