Returns a sub string of the month name
 Params:
 +str+:: integer of the month
548459
def get_date_name_by_number(str)
      case str
      when  1 then I18n.t("helpers.view_helper.get_date_name_by_number.date_1")
      when  2 then I18n.t("helpers.view_helper.get_date_name_by_number.date_2")
      when  3 then I18n.t("helpers.view_helper.get_date_name_by_number.date_3")
      when  4 then I18n.t("helpers.view_helper.get_date_name_by_number.date_4")
      when  5 then I18n.t("helpers.view_helper.get_date_name_by_number.date_5")
      when  6 then I18n.t("helpers.view_helper.get_date_name_by_number.date_6")
      when  7 then I18n.t("helpers.view_helper.get_date_name_by_number.date_7")
      when  8 then I18n.t("helpers.view_helper.get_date_name_by_number.date_8")
      when  9 then I18n.t("helpers.view_helper.get_date_name_by_number.date_9")
      when 10 then I18n.t("helpers.view_helper.get_date_name_by_number.date_10")
      when 11 then I18n.t("helpers.view_helper.get_date_name_by_number.date_11")
      when 12 then I18n.t("helpers.view_helper.get_date_name_by_number.date_12")
      end
    end
651683
def end_of_month(val):
    
    if type(val) == date:
        val = datetime.fromordinal(val.toordinal())
    if val.month == 12:
        return start_of_month(val).replace(year=val.year + 1, month=1) \
               - timedelta(microseconds=1)
    else:
        return start_of_month(val).replace(month=val.month + 1) \
               - timedelta(microseconds=1)
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);
			}
497934
private int parseMonth(String month) {
    for (int i = 0; i < months.length; i++)
      if (months[i].startsWith(month))
        return i;
    return -1;
  }
472562
function(date, full) {
			return ((full == true) ? this.months[date] : ((this.months[date].length > 3) ? this.months[date].substring(0, 3) : this.months[date]))
		}
1321548
def size_in_months(self):
        
        if (self[0] == MONTH):
            return self[2]
        if(self[0] == YEAR):
            return self[2] * 12
        raise ValueError("Cannot calculate number of months in {0}".format(self[0]))
573582
private Month readOptionalMonth(JSONValue val) {

        String str = readOptionalString(val);
        if (null != str) {
            try {
                return Month.valueOf(str);
            } catch (@SuppressWarnings("unused") IllegalArgumentException e) {
                // Do nothing -return the default value
            }
        }
        return null;
    }
783986
public static function monthName($month, $abbr = false, array $options = []) {
		$months = [
			'long' => [
				'January',
				'February',
				'March',
				'April',
				'May',
				'June',
				'July',
				'August',
				'September',
				'October',
				'November',
				'December'
			],
			'short' => [
				'Jan',
				'Feb',
				'Mar',
				'Apr',
				'May',
				'Jun',
				'Jul',
				'Aug',
				'Sep',
				'Oct',
				'Nov',
				'Dec'
			],
		];
		$month = (int)($month - 1);
		if (!$abbr) {
			return __d('tools', $months['long'][$month]);
		}
		$monthName = __d('tools', $months['short'][$month]);
		if (!empty($options['appendDot']) && strlen(__d('tools', $months['long'][$month])) > 3) {
			$monthName .= '.';
		}
		return $monthName;
	}
229162
def month(self, abbr: bool = False) -> str:
        
        key = 'abbr' if abbr else 'name'
        months = self._data['month'].get(key)
        return self.random.choice(months)
1168850
def extract_month_from_xml_element(element)
      month = element.xpath('date/month').text.to_i
      year = element.xpath('date/year').text.to_i
      [year, month]
    end
1102996
private static Map<String, Integer> getMonthNames(Locale locale) {
		Map<String, Integer> r = MONTH_NAMES_CACHE.get(locale);
		if (r == null) {
			DateFormatSymbols symbols = DateFormatSymbols.getInstance(locale);
			r = new HashMap<>(24);
			
			//insert long month names
			String[] months = symbols.getMonths();
			for (int i = 0; i < months.length; ++i) {
				String m = months[i];
				if (!m.isEmpty()) {
					r.put(m.toUpperCase(), i + 1);
				}
			}
			
			//insert short month names
			String[] shortMonths = symbols.getShortMonths();
			for (int i = 0; i < shortMonths.length; ++i) {
				String m = shortMonths[i];
				if (!m.isEmpty()) {
					r.put(m.toUpperCase(), i + 1);
				}
			}
			MONTH_NAMES_CACHE.put(locale, r);
		}
		
		return r;
	}
1264731
def parse_month(text: str) -> int:
    ''''''
    text = text.lower()
    try:
        return MONTH_MAP[text]
    except KeyError:
        pass

    try:
        return MONTH_MAP[text[:3]]
    except KeyError:
        pass

    raise ValueError('Month {} not found.'.format(repr(text)))
1126807
def month(self, month):
        
        if month is None:
            raise ValueError("Invalid value for `month`, must not be `None`")
        if month is not None and not re.search('^\\d{4}-\\d{2}$', month):
            raise ValueError("Invalid value for `month`, must be a follow pattern or equal to `/^\\d{4}-\\d{2}$/`")

        self._month = month
190918
def subtract_months(self, months: int) -> datetime:
        
        self.value = self.value - relativedelta(months=months)
        return self.value
995466
def convert_param_to_dirname(param):
    
    if type(param) == types.StringType:
        return param
    else:
        return re.sub("0+$", '0', '%f'%param)
1208163
def monthly(date=datetime.date.today()):
    
    return datetime.date(date.year, date.month, 1)
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;
}