def label(self, time, major=False): time = BosparanianDateTime.from_time(time) if major: return "%s %s %s" % (time.day, bosp_abbreviated_name_of_month(time.month), format_year(time.year)) return str(time.day)
def label(self, time, major=False): time = BosparanianDateTime.from_time(time) if major: return "%s %s %s: %s:%s" % ( time.day, bosp_abbreviated_name_of_month(time.month), format_year(time.year), time.hour, time.minute) return str(time.minute)
def _time_range_string(self, start, end): start = BosparanianDateTime.from_time(start) end = BosparanianDateTime.from_time(end) if start.year == end.year: if start.month == end.month: return "%s-%s %s %s" % (start.day, end.day, bosp_abbreviated_name_of_month( start.month), format_year(start.year)) return "%s %s-%s %s %s" % ( start.day, bosp_abbreviated_name_of_month(start.month), end.day, bosp_abbreviated_name_of_month( end.month), format_year(start.year)) return "%s %s %s-%s %s %s" % ( start.day, bosp_abbreviated_name_of_month( start.month), format_year(start.year), end.day, bosp_abbreviated_name_of_month(end.month), format_year(end.year))
def label(self, time, major=False): time = BosparanianDateTime.from_time(time) if major: return "%s %s" % (bosp_name_of_month( time.month), format_year(time.year)) if time.month == 13: return bosp_abbreviated_name_of_month(time.month) return bosp_name_of_month(time.month)
def label(self, time, major=False): day_of_week = BosparanianTimeType().get_day_of_week(time) if major: time = BosparanianDateTime.from_time(time) return "%s %s %s %s" % ( bosp_abbreviated_name_of_weekday(day_of_week), time.day, bosp_abbreviated_name_of_month( time.month), format_year(time.year)) return (bosp_abbreviated_name_of_weekday(day_of_week) + " %s" % BosparanianDateTime.from_time(time).day)
def label(self, time, major=False): day_of_week = BosparanianTimeType().get_day_of_week(time) if major: time = BosparanianDateTime.from_time(time) return "%s %s %s %s" % (bosp_abbreviated_name_of_weekday(day_of_week), time.day, bosp_abbreviated_name_of_month(time.month), format_year(time.year)) return (bosp_abbreviated_name_of_weekday(day_of_week) + " %s" % BosparanianDateTime.from_time(time).day)
def _time_range_string(self, start, end): start = BosparanianDateTime.from_time(start) end = BosparanianDateTime.from_time(end) if start.year == end.year: if start.month == end.month: return "%s-%s %s %s" % (start.day, end.day, bosp_abbreviated_name_of_month(start.month), format_year(start.year)) return "%s %s-%s %s %s" % (start.day, bosp_abbreviated_name_of_month(start.month), end.day, bosp_abbreviated_name_of_month(end.month), format_year(start.year)) return "%s %s %s-%s %s %s" % (start.day, bosp_abbreviated_name_of_month(start.month), format_year(start.year), end.day, bosp_abbreviated_name_of_month(end.month), format_year(end.year))
def format(self, year, month, day): mstr = bosp_abbreviated_name_of_month(month) return ("%4d-%3s-%02d" % (year, mstr, day), self._is_bc_year(year))
def label_without_time(time): bosparanian_datetime = BosparanianDateTime.from_time(time) return u"%s %s %s" % (bosparanian_datetime.day, bosp_abbreviated_name_of_month( bosparanian_datetime.month), bosparanian_datetime.year)
def label_without_time(time): bosparanian_datetime = BosparanianDateTime.from_time(time) return u"%s %s %s" % (bosparanian_datetime.day, bosp_abbreviated_name_of_month(bosparanian_datetime.month), bosparanian_datetime.year)