指定した期間の経過日数を返します
@method passDays
@param  {DATE}   date
@param  {String} term
@return {Number} days
764111
function passDays (date, term) {
  var from = this.from(date, term);
  return from ? this.diff(from, date, 'd') + 1 : null;
}
823210
function(date) {
        if (this._calendar.name !== date._calendar.name) {
            throw (_exports.local.differentCalendars || _exports.regionalOptions[''].differentCalendars).
                replace(/\{0\}/, this._calendar.local.name).replace(/\{1\}/, date._calendar.local.name);
        }
        var c = (this._year !== date._year ? this._year - date._year :
            this._month !== date._month ? this.monthOfYear() - date.monthOfYear() :
            this._day - date._day);
        return (c === 0 ? 0 : (c < 0 ? -1 : +1));
    }
451459
public static int day(EvaluationContext ctx, Object date) {
        return Conversions.toDateOrDateTime(date, ctx).get(ChronoField.DAY_OF_MONTH);
    }
1001046
function CronDate (date) {
		this.milliseconds = date.getMilliseconds();
		this.seconds = date.getSeconds() + 1;
		this.minutes = date.getMinutes();
		this.hours = date.getHours();
		this.days = date.getDate();
		this.months  = date.getMonth();
		this.years = date.getFullYear();
	}
1180449
function from (date, term) {
  if (!term) {
    return null;
  }
  var se = this.getRange(date, term);
  return se ? se.from : null;
}
115467
function fixDay(days) {
		var s = [], i;
		for (i = 1; i < days.length; i++) {
			s.push(days[i]);
		}
		s.push(days[0]);
		return s;
	}
737650
function getEra(date, daily) {
  date = this.toDate(date);
  return date ? getEraFn(date, daily) : null;
}
1149188
private static Calendar dateToCalendar(Date date) {
		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		return cal;
	}
742720
function hebElapsedDays(hYear){
	// borrowed from original JS
	var m_elapsed = 235 * Math.floor((hYear - 1) / 19) +
		12 * ((hYear - 1) % 19) +
		Math.floor(((((hYear - 1) % 19) * 7) + 1) / 19);

	var p_elapsed = 204 + (793 * (m_elapsed % 1080));

	var h_elapsed = 5 + (12 * m_elapsed) +
		793 * Math.floor(m_elapsed / 1080) +
		Math.floor(p_elapsed / 1080);

	var parts = (p_elapsed % 1080) + 1080 * (h_elapsed % 24);

	var day = 1 + 29 * m_elapsed + Math.floor(h_elapsed / 24);
	var alt_day = day + ((parts >= 19440) ||
		((2 == (day % 7)) && (parts >= 9924) && !(LEAP (hYear))) ||
		((1 == (day % 7)) && (parts >= 16789) && LEAP (hYear - 1)));

	return alt_day + ((alt_day % 7) === 0 ||
		(alt_day % 7) == 3 ||
		(alt_day % 7) == 5);
}
636136
function(date) {
        var minDate = this.cfg.getProperty(DEF_CFG.MINDATE.key),
            maxDate = this.cfg.getProperty(DEF_CFG.MAXDATE.key),
            dm = DateMath;
        
        if (minDate) {
            minDate = dm.clearTime(minDate);
        } 
        if (maxDate) {
            maxDate = dm.clearTime(maxDate);
        }
    
        var clearedDate = new Date(date.getTime());
        clearedDate = dm.clearTime(clearedDate);
    
        return ((minDate && clearedDate.getTime() < minDate.getTime()) || (maxDate && clearedDate.getTime() > maxDate.getTime()));
    }
178951
function(date, range) {
		"use strict";

		if (typeof date === "number") {
			date = new Date(date);
		}

		if (arguments.length < 2) {
			range = this.options.range;
		}

		switch(this.options.domain) {
		case "hour" :
			var domains = this.getHourDomain(date, range);

			// Case where an hour is missing, when passing from standard time to DST
			// Missing hour is perfectly acceptabl in subDomain, but not in domains
			if (typeof range === "number" && domains.length < range) {
				if (range > 0) {
					domains.push(this.getHourDomain(domains[domains.length-1], 2)[1]);
				} else {
					domains.shift(this.getHourDomain(domains[0], -2)[0]);
				}
			}
			return domains;
		case "day"  :
			return this.getDayDomain(date, range);
		case "week" :
			return this.getWeekDomain(date, range);
		case "month":
			return this.getMonthDomain(date, range);
		case "year" :
			return this.getYearDomain(date, range);
		}
	}
312254
function(date, units)
			{
				var ceilYear = (units.years > 0);
				var ceilMonth = ceilYear || (units.months > 0);
				var ceilDay = ceilMonth || (units.days > 0);
				var ceilHours = ceilDay || (units.hours > 0);
				var ceilMinutes = ceilHours || (units.minutes > 0);
				var ceilSeconds = ceilMinutes || (units.seconds > 0);

				if (!ceilSeconds)
					return;

				if (date.getSeconds() > 0)
				{
					if (units.seconds > 0)
						date.setSeconds(Math.min(Math.ceil(date.getSeconds() / units.seconds) * units.seconds, 60));
					else
						date.setSeconds(60);
				}

				if (!ceilMinutes)
					return;

				if (date.getMinutes() > 0)
				{
					if (units.minutes > 0)
						date.setMinutes(Math.min(Math.ceil(date.getMinutes() / units.minutes) * units.minutes, 60));
					else
						date.setMinutes(60);
				}

				if (!ceilHours)
					return;

				if (date.getHours() > 0)
				{
					if (units.hours > 0)
						date.setHours(Math.min(Math.ceil(date.getHours() / units.hours) * units.hours, 24));
					else
						date.setHours(24);
				}

				if (!ceilDay)
					return;

				if (date.getDay() > 1)
				{
					var daysInMonth = TimeUtils.daysInMonth(date);
					if (units.days > 0)
						date.setDay(Math.min(Math.ceil((date.getDay() - 1) / units.days) * units.days, daysInMonth) + 1);
					else
						date.setDay(daysInMonth + 1);
				}

				if (!ceilMonth)
					return;

				if (date.getMonth() > 1)
				{
					if (units.months > 0)
						date.setMonth(Math.min(Math.ceil((date.getMonth() - 1) / units.months) * units.months, 12) + 1);
					else
						date.setMonth(12 + 1);
				}

				if (!ceilYear)
					return;

				if (units.years > 0)
					date.setYear(Math.ceil(date.getYear() / units.years) * units.years);
			}
762842
function(date) {
		var checkDate = new Date(date.getTime());
		// Find Thursday of this week starting on Monday
		checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
		var time = checkDate.getTime();
		checkDate.setMonth(0); // Compare with Jan 1
		checkDate.setDate(1);
		return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
	}
183698
public static Date addDays(Date date, int numberOfDays) {
    return Date.from(date.toInstant().plus(numberOfDays, ChronoUnit.DAYS));
  }
841809
function countTerm (koyomi, date, term) {
  date = koyomi.toDate(date);
  if (!date) {
    return null;
  }
  switch(term) {
  case 'y':
    return countYear(koyomi, koyomi.from(date, 'y'));
  case 'm':
    return countMonth(koyomi, koyomi.from(date, 'm'));
  case 'w':
    return countDays(koyomi, koyomi.from(date, 'w'), 7);
  default:
    return koyomi.isOpen(date) ? 1 : 0;
  }
}
755741
function addDayToRange(day) {
  var range = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { from: null, to: null };
  var from = range.from,
      to = range.to;

  if (!from) {
    from = day;
  } else if (from && to && isSameDay(from, to) && isSameDay(day, from)) {
    from = null;
    to = null;
  } else if (to && isDayBefore(day, from)) {
    from = day;
  } else if (to && isSameDay(day, to)) {
    from = day;
    to = day;
  } else {
    to = day;
    if (isDayBefore(to, from)) {
      to = from;
      from = day;
    }
  }

  return { from: from, to: to };
}
136733
function remainBiz (date, term) {
  date = this.toDate(date);
  if (!date) {
    return null;
  }
  var to = this.toDate(this.to(date, term));
  return to ? countFromTo(this, date, to) : null;
}