Return a key suitable for sorting by month.

		>>> k1 = ChannelPage.date_key('September, 2012')
		>>> k2 = ChannelPage.date_key('August, 2013')
		>>> k2 > k1
		True
770779
def date_key(cls, month_string):
		
		month, year = month_string.split(',')
		month_ord = cls.month_ordinal[month]
		return year, month_ord
296581
def get_month_from_date_str(date_str, lang=DEFAULT_DATE_LANG):
    
    date_str = date_str.lower()
    with calendar.different_locale(LOCALES[lang]):
        month_abbrs = list(calendar.month_abbr)
        for seq, abbr in enumerate(month_abbrs):
            if abbr and abbr.lower() in date_str:
                return seq, abbr
    return ()
6174
def month(self):
        
        url = "/stats/month"
        result = self._get(url)
        return StatModel.parse(result)
53981
def __convert_keys_1(self, header, d):
        
        d2 = {}
        try:
            for k, v in d.items():
                try:
                    d2[self.__get_noaa_key_w_context(header, k)] = v
                except KeyError:
                    pass
        except Exception:
            return d
        return d2
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)
763759
function (d) {
		"use strict";

		if (typeof d === "number") {
			d = new Date(d);
		}

		var monthFirstWeekNumber = this.getWeekNumber(new Date(d.getFullYear(), d.getMonth()));
		return this.getWeekNumber(d) - monthFirstWeekNumber - 1;
	}
407238
def getKey(k)
      return nil if k > @nitems || k <= 0
      pos = SIZEOF_BLOCK_HEADER + (SIZEOF_KEY * (k - 1))
      keydata = @data[pos, SIZEOF_KEY]
      data2key(keydata)
    end
1141207
def this_month():
        
        since = TODAY + delta(day=1)
        until = since + delta(months=1)
        return Date(since), Date(until)
1248576
def data_key(data) :
    ""
    if isinstance(data, (bytes, float, frozenset, int, str, tuple)) :
        result = data
    else :
        # data itself is non-hashable
        result = id(data)
    #end if
    return \
        result
674298
def [] *key
      return slice(*key) if key.size != 1
      key = key[0]
      case key
      when Numeric
        key
      when DateTime
        Helper.find_index_of_date(@data, key)
      when Range
        # FIXME: get_by_range is suspiciously close to just #slice,
        #   but one of specs fails when replacing it with just slice
        get_by_range(key.first, key.last)
      else
        raise ArgumentError, "Key #{key} is out of bounds" if
          Helper.key_out_of_bounds?(key, @data)

        slice(*Helper.find_date_string_bounds(key))
      end
    end
88042
def t(self):
    "'"
    return u'%02d' % calendar.monthrange(self.data.year, self.data.month)[1]
762956
def _get_range_timestamp_key(self, start: Key, end: Key,
                                 count: int = 0) -> List[Tuple[Key, Any]]:
        
        raise NotImplementedError()
104009
private static int tryParseMonth(String month, Locale locale) {
		Map<String, Integer> names = getMonthNames(locale);
		Integer r = names.get(month.toUpperCase());
		if (r != null) {
			return r;
		}
		return -1;
	}
1040537
def get_key(cls, k, default=None):
        
        k = cls.__name__ + "__" + k
        if k in session:
            return session[k]
        else:
            return default
1032923
def get_month(self):
        
        year = super(BuildableMonthArchiveView, self).get_year()
        month = super(BuildableMonthArchiveView, self).get_month()
        fmt = self.get_month_format()
        return date(int(year), int(month), 1).strftime(fmt)
1316925
def get(self, key: K) -> TOption[T]:
        
        return TOption(self[key]) if key in self else TOption(None)
214929
def mkIntDate(s):
    
    n = s.__len__()
    d = int(s[-(n - 1):n])

    return d