the 3rd Sunday in June
    :param year: int
    :return: Father's day
177063
def father(year=None):
    
    june_first = datetime.date(_year, 6, 1) if not year else datetime.date(int(year), 6, 1)
    weekday_seq = june_first.weekday()
    return datetime.date(june_first.year, 6, (21 - weekday_seq))
376709
private static Set<Date> getHolidaySet(int year) {
		if (holidays == null) {
			holidays = new HashMap<Integer, Set<Date>>();
		}
		if (!holidays.containsKey(year)) {
			Set<Date> yearSet = new HashSet<Date>();

			// Add set holidays.
			yearSet.add(getDate(1, Calendar.JANUARY, year));
			yearSet.add(getDate(1, Calendar.MAY, year));
			yearSet.add(getDate(17, Calendar.MAY, year));
			yearSet.add(getDate(25, Calendar.DECEMBER, year));
			yearSet.add(getDate(26, Calendar.DECEMBER, year));

			// Add movable holidays - based on easter day.
			Calendar easterDay = dateToCalendar(getEasterDay(year));

			// Sunday before easter.
			yearSet.add(rollGetDate(easterDay, -7));

			// Thurday before easter.
			yearSet.add(rollGetDate(easterDay, -3));

			// Friday before easter.
			yearSet.add(rollGetDate(easterDay, -2));

			// Easter day.
			yearSet.add(easterDay.getTime());

			// Second easter day.
			yearSet.add(rollGetDate(easterDay, 1));

			// "Kristi himmelfart" day.
			yearSet.add(rollGetDate(easterDay, 39));

			// "Pinse" day.
			yearSet.add(rollGetDate(easterDay, 49));

			// Second "Pinse" day.
			yearSet.add(rollGetDate(easterDay, 50));

			holidays.put(year, yearSet);
		}
		return holidays.get(year);
	}
957373
def _iso_year_start(iso_year):
    ""
    fourth_jan = dt.date(iso_year, 1, 4)
    delta = dt.timedelta(fourth_jan.isoweekday()-1)
    return fourth_jan - delta
92274
def year(self, value=None):
        
        if value is None:
            return self.day() / 365
        else:
            self.millisecond(self.day(value * 365))
258139
def day(self, num):
        """"""
        d = date(self.year, 1, 4)  # The Jan 4th must be in week 1 according to ISO
        return d + timedelta(weeks=self.week-1, days=-d.weekday() + num)
414231
function(year) {
			var date = this._validate(year, this.minMonth, this.minDay,
				$.calendars.local.invalidYear || $.calendars.regionalOptions[''].invalidYear);
			return (date.year() < 0 ? this.local.epochs[0] : this.local.epochs[1]);
		}
907271
def datetime_to_year_quarter(dt):
    
    year = dt.year
    quarter = int(math.ceil(float(dt.month)/3))
    return (year, quarter)
240599
def get_year_week(timestamp):
    """"""
    time_ = datetime.fromtimestamp(timestamp)
    year = time_.isocalendar()[0]
    week = time_.isocalendar()[1]
    return year, week
289769
def day_of_year(self):
        
        k = 1 if self.is_leap_year() else 2

        return (275 * self.month) // 9 - k * ((self.month + 9) // 12) + self.day - 30
1341792
protected function getEasterDates($year, $orthodox = false)
    {
        $easterSunday = $orthodox ? $this->createOrthodoxSunday($year) :  $this->createSunday($year);

        $easterSunday->setTimezone(new \DateTimeZone(date_default_timezone_get()));

        $easterMonday = clone $easterSunday;
        $easterMonday->modify('+1 day');
        $maundyThursday = clone $easterSunday;
        $maundyThursday->modify('-3 days');
        $goodFriday = clone $easterSunday;
        $goodFriday->modify('-2 days');
        $saturday = clone $easterSunday;
        $saturday->modify('-1 days');
        $ascensionDay = clone $easterSunday;
        $ascensionDay->modify('+39 days');
        $shroveTuesday = clone $easterSunday;
        $shroveTuesday->modify('-47 days');


        $pentecostSunday = clone $easterSunday;
        $pentecostSunday->modify('+49 days');
        $pentecostMonday = clone $pentecostSunday;
        $pentecostMonday->modify('+1 days');
        $pentecostSaturday = clone $pentecostSunday;
        $pentecostSaturday->modify('-1 days');
        $corpusChristi = clone $easterSunday;
        $corpusChristi->modify('+60 days');

        return array(
            'shroveTuesday' => $shroveTuesday,
            'maundyThursday' => $maundyThursday,
            'easterSunday' => $easterSunday,
            'easterMonday' => $easterMonday,
            'saturday' => $saturday,
            'goodFriday' => $goodFriday,
            'ascensionDay' => $ascensionDay,
            'pentecostSaturday' => $pentecostSaturday,
            'pentecostSunday' => $pentecostSunday,
            'pentecostMonday' => $pentecostMonday,
            'corpusChristi' => $corpusChristi
        );
    }
750872
def day_of_year(dt):
        # type: (int) -> int
        """"""
        sec = time.mktime(dt.timetuple())
        t = time.localtime(sec)
        return t.tm_yday
520657
def get_year_season(day=None):
    
    if day is None:
        day = date.today()
    year = day.year

    if day.month > 3 and day.month <= 7:
        season = Semester.SUMMER
    elif day.month > 7 and day.month <= 10:
        season = Semester.FALL
    else:
        season = Semester.SPRING
        if day.month > 10:
            year += 1
    return year, season
1261358
function(year) {
    var date = this.easterSunday(year);
    var y = date.getFullYear();
    var m = date.getMonth() + 1;
    var d = date.getDate() + 1;
    return this.createDate(y, m, d);
  }
1130145
def date(ctx, year, month, day):
    
    return _date(conversions.to_integer(year, ctx), conversions.to_integer(month, ctx), conversions.to_integer(day, ctx))
446842
def get_variable_days(self, year):  # noqa
        ""
        days = super(ChristianMixin, self).get_variable_days(year)
        if self.include_epiphany:
            days.append((date(year, 1, 6), "Epiphany"))
        if self.include_clean_monday:
            days.append((self.get_clean_monday(year), "Clean Monday"))
        if self.include_annunciation:
            days.append((date(year, 3, 25), "Annunciation"))
        if self.include_ash_wednesday:
            days.append(
                (self.get_ash_wednesday(year), self.ash_wednesday_label)
            )
        if self.include_palm_sunday:
            days.append((self.get_palm_sunday(year), "Palm Sunday"))
        if self.include_holy_thursday:
            days.append((self.get_holy_thursday(year), "Holy Thursday"))
        if self.include_good_friday:
            days.append((self.get_good_friday(year), self.good_friday_label))
        if self.include_easter_saturday:
            days.append((self.get_easter_saturday(year), "Easter Saturday"))
        if self.include_easter_sunday:
            days.append((self.get_easter_sunday(year), "Easter Sunday"))
        if self.include_easter_monday:
            days.append((self.get_easter_monday(year), "Easter Monday"))
        if self.include_assumption:
            days.append((date(year, 8, 15), "Assumption of Mary to Heaven"))
        if self.include_all_saints:
            days.append((date(year, 11, 1), "All Saints Day"))
        if self.include_all_souls:
            days.append((date(year, 11, 2), "All Souls Day"))
        if self.include_immaculate_conception:
            days.append((date(year, 12, 8), self.immaculate_conception_label))
        if self.include_christmas:
            days.append((date(year, 12, 25), "Christmas Day"))
        if self.include_christmas_eve:
            days.append((date(year, 12, 24), "Christmas Eve"))
        if self.include_boxing_day:
            days.append((date(year, 12, 26), self.boxing_day_label))
        if self.include_ascension:
            days.append((
                self.get_ascension_thursday(year), "Ascension Thursday"))
        if self.include_whit_monday:
            days.append((self.get_whit_monday(year), self.whit_monday_label))
        if self.include_whit_sunday:
            days.append((self.get_whit_sunday(year), self.whit_sunday_label))
        if self.include_corpus_christi:
            days.append((self.get_corpus_christi(year), "Corpus Christi"))
        return days
253339
def get_easter_monday(self, year):
        ""
        sunday = self.get_easter_sunday(year)
        return sunday + timedelta(days=1)
954691
function getAge(birthday, when) {
  birthday = this.toDate(birthday);
  when = this.toDate(when || new Date());
  var b = new Date(birthday).setFullYear(2000);
  var w = new Date(when).setFullYear(2000);
  return when.getFullYear() - birthday.getFullYear() - (w >= b ? 0: 1);
}