Return `true` if a day is in the future, e.g. tomorrow or any day
after tomorrow.

@export
@param  {Date}  d
@return {Boolean}
492535
function isFutureDay(d) {
  var tomorrow = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);
  tomorrow.setHours(0, 0, 0, 0);
  return d >= tomorrow;
}
1358805
@SuppressWarnings("deprecation")
	public static boolean timeEquals(java.util.Date d1, java.util.Date d2) {
        if (d1 == null || d2 == null) {
            return false;
        }

        return d1.getHours() == d2.getHours()
                && d1.getMinutes() == d2.getMinutes()
                && d1.getSeconds() == d2.getSeconds();
    }
152767
function(d, val) {
    var m = later.m.val(d),
        s = later.s.val(d),
        inc = val > 59 ? 60-m : (val <= m ? (60-m) + val : val-m),
        next = new Date(d.getTime() + (inc * later.MIN) - (s * later.SEC));

    // correct for passing over a daylight savings boundry
    if(!later.date.isUTC && next.getTime() <= d.getTime()) {
      next = new Date(d.getTime() + ((inc + 120) * later.MIN) - (s * later.SEC));
    }

    return next;
  }
822191
function(d, val) {
    var wyThur = later.dw.next(later.wy.start(d), 5),
        year = later.date.prevRollover(wyThur, val, later.wy, later.Y);

    // handle case where 1st of year is last week of previous month
    if(later.wy.val(year) !== 1) {
      year = later.dw.next(year, 2);
    }

    var wyMax = later.wy.extent(year)[1],
        wyEnd = later.wy.end(year);

    val = val > wyMax ? wyMax : val || wyMax;

    return later.wy.end(later.date.next(
        later.Y.val(wyEnd),
        later.M.val(wyEnd),
        later.D.val(wyEnd) + 7 * (val-1)
      ));
  }
706454
public static function isYesterday($time): bool
    {
        return (self::factory($time)->format('Y-m-d') === self::factory('yesterday')->format('Y-m-d'));
    }
77612
def _day_rule_matches(self, rule, dt):
        
        if dt.weekday() == 4:
            sat = dt + datetime.timedelta(days=1)
            if super(USFederalHolidays, self)._day_rule_matches(rule, sat):
                return True
        elif dt.weekday() == 0:
            sun = dt - datetime.timedelta(days=1)
            if super(USFederalHolidays, self)._day_rule_matches(rule, sun):
                return True
        return super(USFederalHolidays, self)._day_rule_matches(rule, dt)
1065808
function (d, range) {
		"use strict";

		var weekStart;

		if (this.options.weekStartOnMonday === false) {
			weekStart = new Date(d.getFullYear(), d.getMonth(), d.getDate() - d.getDay());
		} else {
			if (d.getDay() === 1) {
				weekStart = new Date(d.getFullYear(), d.getMonth(), d.getDate());
			} else if (d.getDay() === 0) {
				weekStart = new Date(d.getFullYear(), d.getMonth(), d.getDate());
				weekStart.setDate(weekStart.getDate() - 6);
			} else {
				weekStart = new Date(d.getFullYear(), d.getMonth(), d.getDate()-d.getDay()+1);
			}
		}

		var endDate = new Date(weekStart);

		var stop = range;
		if (typeof range !== "object") {
			stop = new Date(endDate.setDate(endDate.getDate() + range * 7));
		}

		return (this.options.weekStartOnMonday === true) ?
			d3.time.mondays(Math.min(weekStart, stop), Math.max(weekStart, stop)):
			d3.time.sundays(Math.min(weekStart, stop), Math.max(weekStart, stop))
		;
	}
716871
def _is_dst(dt):
        
        # we can't use `dt.timestamp()` here since it requires a `utcoffset`
        # and we don't want to get into a recursive loop
        localtime = time.localtime(time.mktime((
            dt.year,
            dt.month,
            dt.day,
            dt.hour,
            dt.minute,
            dt.second,
            dt.weekday(),
            0,              # day of the year
            -1              # dst
        )))
        return localtime.tm_isdst > 0
323925
def is_within_limits(self, limit, date, dates):
        
        return any((self.second_diff(date, d) <= limit for d in dates))
346924
@SuppressWarnings("deprecation")
	public static boolean dateTimeEquals(java.util.Date d1, java.util.Date d2) {
        if (d1 == null || d2 == null) {
            return false;
        }

        return d1.getDate() == d2.getDate()
                && d1.getMonth() == d2.getMonth()
                && d1.getYear() == d2.getYear()
                && d1.getHours() == d2.getHours()
                && d1.getMinutes() == d2.getMinutes()
                && d1.getSeconds() == d2.getSeconds();
    }
153029
@Override
    public boolean isDone() {
        for (Future<FUTURE_TYPE> future : futureList) {
            if (!future.isDone()) {
                return false;
            }
        }
        return true;
    }
1184069
def _isdst(dt):
    
    if type(dt) == datetime.date:
        dt = datetime.datetime.combine(dt, datetime.datetime.min.time())
    dtc = dt.replace(year=datetime.datetime.now().year)
    if time.localtime(dtc.timestamp()).tm_isdst == 1:
        return True
    return False
1133884
private function isSameDay(\DateTime $d1, \DateTime $d2)
    {
        return $d1->format('Y') == $d2->format('Y') && $d1->format('z') == $d2->format('z');
    }
624580
public static boolean isToday(Date time) {
        String now = getFormatDate(SHORT);
        String target = getFormatDate(SHORT, time);
        return now.equals(target);
    }
1126487
public static Date getLastDayFromCurrentWeek(Date d) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(d);        
        // depends on Locale (if a week starts on Monday or on Sunday)
        if (cal.getFirstDayOfWeek() == Calendar.SUNDAY) {
        	cal.add(Calendar.WEEK_OF_YEAR, 1);  
        }	
        cal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
        cal.set(Calendar.HOUR_OF_DAY, 23);
        cal.set(Calendar.MINUTE, 59);
        cal.set(Calendar.SECOND, 59);
        cal.set(Calendar.MILLISECOND, 999);
        return cal.getTime();
    }
1161026
function(d) {
    return d.dcStart || (d.dcStart =
      later.date.next(
        later.Y.val(d),
        later.M.val(d),
        Math.max(1, ((later.dc.val(d) - 1) * 7) + 1 || 1)));
  }
566076
function dateRelative(d, dRelative, arg1, arg2) {
  var adu, format, type, localeCode, fn;
  assertDateIsValid(d);
  if (isFunction(arg1)) {
    fn = arg1;
  } else {
    localeCode = arg1;
    fn = arg2;
  }
  adu = getAdjustedUnitForDate(d, dRelative);
  if (fn) {
    format = fn.apply(d, adu.concat(localeManager.get(localeCode)));
    if (format) {
      return dateFormat(d, format, localeCode);
    }
  }
  // Adjust up if time is in ms, as this doesn't
  // look very good for a standard relative date.
  if (adu[1] === 0) {
    adu[1] = 1;
    adu[0] = 1;
  }
  if (dRelative) {
    type = 'duration';
  } else if (adu[2] > 0) {
    type = 'future';
  } else {
    type = 'past';
  }
  return localeManager.get(localeCode).getRelativeFormat(adu, type);
}