예제 #1
0
파일: timetype.py 프로젝트: ncqgm/gnumed
 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)
예제 #2
0
 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)
예제 #3
0
 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))
예제 #4
0
 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)
예제 #5
0
 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)
예제 #6
0
파일: timetype.py 프로젝트: ncqgm/gnumed
 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)
예제 #7
0
파일: timetype.py 프로젝트: ncqgm/gnumed
 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))
예제 #8
0
 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))
예제 #9
0
 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)
예제 #10
0
파일: timetype.py 프로젝트: ncqgm/gnumed
 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)