Return date object with same year, month and day.

        :rtype: :py:class:`khayyam.JalaliDate`
197368
def date(self):
        
        return khayyam.JalaliDate(self.year, self.month, self.day)
440532
def naive(self):  # type: () -> DateTime
        
        return self.__class__(
            self.year,
            self.month,
            self.day,
            self.hour,
            self.minute,
            self.second,
            self.microsecond,
        )
873467
def um_date_to_date(d):
    

    return datetime.datetime(year=d[0], month=d[1], day=d[2],
                             hour=d[3], minute=d[4], second=d[5])
92274
def year(self, value=None):
        
        if value is None:
            return self.day() / 365
        else:
            self.millisecond(self.day(value * 365))
1171334
def julian_day(year, month=1, day=1):
    """"""
    janfeb = month < 3
    return (day
            + 1461 * (year + 4800 - janfeb) // 4
            + 367 * (month - 2 + janfeb * 12) // 12
            - 3 * ((year + 4900 - janfeb) // 100) // 4
            - 32075)
577157
def get_object(self, request, year, month, day, slug):
        
        return get_object_or_404(Entry, slug=slug,
                                 publication_date__year=year,
                                 publication_date__month=month,
                                 publication_date__day=day)
550380
def to_jd(year, month, day):
    ''''''

    if year >= 0:
        y = 474
    else:
        y = 473
    epbase = year - y
    epyear = 474 + (epbase % 2820)

    if month <= 7:
        m = (month - 1) * 31
    else:
        m = (month - 1) * 30 + 6

    return day + m + trunc(((epyear * 682) - 110) / 2816) + (epyear - 1) * 365 + trunc(epbase / 2820) * 1029983 + (EPOCH - 1)
118483
def jdToDate(jd):
    ''''''
    if (jd > 2299160):
        # After 5/10/1582, Gregorian calendar
        a = jd + 32044
        b = int((4 * a + 3) / 146097.)
        c = a - int((b * 146097) / 4.)
    else:
        b = 0
        c = jd + 32082
    d = int((4 * c + 3) / 1461.)
    e = c - int((1461 * d) / 4.)
    m = int((5 * e + 2) / 153.)
    day = e - int((153 * m + 2) / 5.) + 1
    month = m + 3 - 12 * int(m / 10.)
    year = b * 100 + d - 4800 + int(m / 10.)
    return [day, month, year]
1141207
def this_month():
        
        since = TODAY + delta(day=1)
        until = since + delta(months=1)
        return Date(since), Date(until)
584427
def monthdatescalendar(cls, year, month):
        
        weeks = []
        week = []
        for day in NepCal.itermonthdates(year, month):
            week.append(day)
            if len(week) == 7:
                weeks.append(week)
                week = []
        if len(week) > 0:
            weeks.append(week)
        return weeks
208867
function(year, month, day) {
    var date = new Date(Date.UTC(year, month - 1, day));
    return date;
  }
845979
def day_interval(year, month, day, return_str=False):
        
        start, end = datetime(year, month, day), datetime(year, month, day) + timedelta(days=1) - timedelta(seconds=1)
        if not return_str:
            return start, end
        else:
            return str(start), str(end)
497778
def date(self, *args, **kwargs):
        
        compare = Date(*args, **kwargs)
        self.add(compare)

        return self
81825
def naive(
    year, month, day, hour=0, minute=0, second=0, microsecond=0
):  # type: (int, int, int, int, int, int, int) -> DateTime
    
    return DateTime(year, month, day, hour, minute, second, microsecond)
1334481
def today(year=None):
    """"""
    return datetime.date(int(year), _date.month, _date.day) if year else _date
770779
def date_key(cls, month_string):
		
		month, year = month_string.split(',')
		month_ord = cls.month_ordinal[month]
		return year, month_ord
706524
def date_to_json(pydate, manager):
    
    if pydate is None:
        return None
    else:
        return dict(
            year=pydate.year,
            month=pydate.month - 1,  # Months are 0-based indices in JS
            date=pydate.day
        )