Return the month from the database in the format expected by the URL.
194819
def get_month(self):
        
        year = super(BuildableDayArchiveView, self).get_year()
        month = super(BuildableDayArchiveView, self).get_month()
        fmt = self.get_month_format()
        dt = date(int(year), int(month), 1)
        return dt.strftime(fmt)
1141207
def this_month():
        
        since = TODAY + delta(day=1)
        until = since + delta(months=1)
        return Date(since), Date(until)
616497
def format_date_string(self, date_tuple):
        
        months = ['', 'January', 'February', 'March', 'April', 'May', 'June',
                  'July', 'August', 'September', 'October', 'November', 'December']
        date_string = ''
        if date_tuple.season:
            return '{0}, {1}'.format(date_tuple.season, date_tuple.year)
        else:
            if not date_tuple.month and not date_tuple.day:
                return '{0}'.format(date_tuple.year)
            if date_tuple.month:
                date_string += months[int(date_tuple.month)]
            if date_tuple.day:
                date_string += ' ' + date_tuple.day
            return ', '.join([date_string, date_tuple.year])
815038
def get_month_range(d=None):
    
    if not d:
        d = timezone.now()

    start = d.replace(day=1, hour=0, minute=0, second=0, microsecond=0)
    end = start + relativedelta(months=1)
    return start, end
90020
function getMonth(moment, service, dt) {
	
	const dateService = new service(moment, dt);
  
  return {
    longName: dateService.monthLong(),
    shortName: dateService.monthShort(),
    daysCount: dateService.daysCount(),
    startDayOfMonth: dateService.startDayOfMonth(),
  };
}
1199582
def formatmonth(self, theyear, themonth, withyear=True,
                    previous_month=None, next_month=None):
        
        self.current_year = theyear
        self.current_month = themonth
        self.day_entries = [date.day
                            for date in Entry.published.filter(
                                publication_date__year=theyear,
                                publication_date__month=themonth
                                ).datetimes('publication_date', 'day')]
        v = []
        a = v.append
        a('<table class="%s">' % (
            self.day_entries and 'entries-calendar' or 'no-entries-calendar'))
        a('\n')
        a(self.formatmonthname(theyear, themonth, withyear=withyear))
        a('\n')
        a(self.formatweekheader())
        a('\n')
        a(self.formatfooter(previous_month, next_month))
        a('\n<tbody>\n')
        for week in self.monthdays2calendar(theyear, themonth):
            a(self.formatweek(week))
            a('\n')
        a('</tbody>\n</table>')
        a('\n')
        return ''.join(v)
1011638
function getDateTranslation(date, locale, name, width, form, extended) {
    switch (name) {
        case TranslationType.Months:
            return getLocaleMonthNames(locale, form, width)[date.getMonth()];
        case TranslationType.Days:
            return getLocaleDayNames(locale, form, width)[date.getDay()];
        case TranslationType.DayPeriods:
            var /** @type {?} */ currentHours_1 = date.getHours();
            var /** @type {?} */ currentMinutes_1 = date.getMinutes();
            if (extended) {
                var /** @type {?} */ rules = getLocaleExtraDayPeriodRules(locale);
                var /** @type {?} */ dayPeriods_1 = getLocaleExtraDayPeriods(locale, form, width);
                var /** @type {?} */ result_1;
                rules.forEach(function (rule, index) {
                    if (Array.isArray(rule)) {
                        // morning, afternoon, evening, night
                        var _a = rule[0], hoursFrom = _a.hours, minutesFrom = _a.minutes;
                        var _b = rule[1], hoursTo = _b.hours, minutesTo = _b.minutes;
                        if (currentHours_1 >= hoursFrom && currentMinutes_1 >= minutesFrom &&
                            (currentHours_1 < hoursTo ||
                                (currentHours_1 === hoursTo && currentMinutes_1 < minutesTo))) {
                            result_1 = dayPeriods_1[index];
                        }
                    }
                    else {
                        // noon or midnight
                        var hours = rule.hours, minutes = rule.minutes;
                        if (hours === currentHours_1 && minutes === currentMinutes_1) {
                            result_1 = dayPeriods_1[index];
                        }
                    }
                });
                if (result_1) {
                    return result_1;
                }
            }
            // if no rules for the day periods, we use am/pm by default
            return getLocaleDayPeriods(locale, form, /** @type {?} */ (width))[currentHours_1 < 12 ? 0 : 1];
        case TranslationType.Eras:
            return getLocaleEraNames(locale, /** @type {?} */ (width))[date.getFullYear() <= 0 ? 0 : 1];
    }
}
985596
def get_months(self, queryset=None, current_site=True):
        
        if queryset is None:
            queryset = self.get_queryset()
        if current_site:
            queryset = queryset.on_site()
        dates_qs = queryset.values_list(queryset.start_date_field, queryset.fallback_date_field)
        dates = []
        for blog_dates in dates_qs:
            if blog_dates[0]:
                current_date = blog_dates[0]
            else:
                current_date = blog_dates[1]
            dates.append((current_date.year, current_date.month,))
        date_counter = Counter(dates)
        dates = set(dates)
        dates = sorted(dates, reverse=True)
        return [{'date': now().replace(year=year, month=month, day=1),
                 'count': date_counter[year, month]} for year, month in dates]
600037
function() {
				if (typeof monthNames === 'function') {
					var month = doubled('M') ?
						monthNames.call(calendar, value.substring(iValue)) :
						monthNamesShort.call(calendar, value.substring(iValue));
					iValue += month.length;
					return month;
				}

				return getName('M', monthNamesShort, monthNames);
			}
1229120
def during(self, year, month):
		""""""
		return self.filter(created__year=year, created__month=month)
1256077
def replace_u_start_month(month):
    """"""
    month = month.lstrip('-')
    if month == 'uu' or month == '0u':
        return '01'
    if month == 'u0':
        return '10'
    return month.replace('u', '0')
1354884
def check_months(text):
    """"""
    err = "MAU102"
    msg = "Months should be capitalized. '{}' is the preferred form."

    list = [

        ["January",         ["january"]],
        ["February",        ["february"]],
        # ["March",           ["march"]],
        ["April",           ["april"]],
        # ["May",             ["may"]],
        ["June",            ["june"]],
        ["July",            ["july"]],
        ["August",          ["august"]],
        ["September",       ["september"]],
        ["October",         ["october"]],
        ["November",        ["november"]],
        ["December",        ["december"]],
    ]

    return preferred_forms_check(text, list, err, msg, ignore_case=False)
357142
def _timesheet_url(url_name, pk, date=None):
    """"""
    url = reverse(url_name, args=(pk,))
    if date:
        params = {'month': date.month, 'year': date.year}
        return '?'.join((url, urlencode(params)))
    return url
1156293
function getDayOfMonth (date, month) {
  date = toStringDate(date)
  if (baseExports.isDate(date)) {
    return Math.floor((getDateTime(getWhatMonth(date, month, STRING_LAST)) - getDateTime(getWhatMonth(date, month, STRING_FIRST))) / DAY_TIME) + 1
  }
  return date
}
277550
public function retrieveMonth($month) {
		if (!$month) {
			return 0;
		}
		$month = mb_strtolower($month);
		if (in_array($month, $this->monthList)) {
			$keys = array_keys($this->monthList, $month);
			return $keys[0] + 1;
		}
		return 0;
	}
666023
private function getMonthTitle( int $monthnum = 0 ) {
		global $wp_locale;
		$date_format = get_option('date_format');
		if ( in_array( $date_format, [
			'DATE_COOKIE',
			'DATE_RFC822',
			'DATE_RFC850',
			'DATE_RFC1036',
			'DATE_RFC1123',
			'DATE_RFC2822',
			'DATE_RSS'
		] ) ) {
			$month_format = 'M';
		} elseif ( in_array( $date_format, [
			'DATE_ATOM',
			'DATE_ISO8601',
			'DATE_RFC3339',
			'DATE_W3C'
		] ) ) {
			$month_format = 'm';
		} else {
			preg_match('/(^|[^\\\\]+)(F|m|M|n)/', str_replace( '\\\\', '', $date_format ), $m );
			if ( isset( $m[2] ) ) {
				$month_format = $m[2];
			} else {
				$month_format = 'F';
			}
		}

		switch ( $month_format ) {
			case 'F' :
				$month = $wp_locale->get_month( $monthnum );
				break;
			case 'M' :
				$month = $wp_locale->get_month_abbrev( $wp_locale->get_month( $monthnum ) );
				break;
			default :
				$month = $monthnum;
				break;
		}

		return $month;
	}
877030
function getMonthDays(year, month) {
  let NUM = 30;
  if ([1, 3, 5, 7, 8, 10, 12].indexOf(month) !== -1) {
    NUM = 31;
  }
  if (month === 2) {
    NUM = isLeapYear(year) ? 29 : 28;
  }
  return NUM;
}