Package Gnumed :: Package timelinelib :: Package calendar :: Package bosparanian :: Module monthnames
[frames] | no frames]

Source Code for Module Gnumed.timelinelib.calendar.bosparanian.monthnames

 1  # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018  Rickard Lindberg, Roger Lindberg 
 2  # 
 3  # This file is part of Timeline. 
 4  # 
 5  # Timeline is free software: you can redistribute it and/or modify 
 6  # it under the terms of the GNU General Public License as published by 
 7  # the Free Software Foundation, either version 3 of the License, or 
 8  # (at your option) any later version. 
 9  # 
10  # Timeline is distributed in the hope that it will be useful, 
11  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
12  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
13  # GNU General Public License for more details. 
14  # 
15  # You should have received a copy of the GNU General Public License 
16  # along with Timeline.  If not, see <http://www.gnu.org/licenses/>. 
17   
18   
19 -def _(message):
20 return message # deferred translation
21 22 23 BOSP_ENGLISH_MONTH_NAMES = [ 24 _("Praios"), 25 _("Rondra"), 26 _("Efferd"), 27 _("Travia"), 28 _("Boron"), 29 _("Hesinde"), 30 _("Firun"), 31 _("Tsa"), 32 _("Phex"), 33 _("Peraine"), 34 _("Ingerimm"), 35 _("Rahja"), 36 _("Nameless Days") 37 ] 38 39 40 BOSP_ABBREVIATED_ENGLISH_MONTH_NAMES = [ 41 _("PRA"), 42 _("RON"), 43 _("EFF"), 44 _("TRA"), 45 _("BOR"), 46 _("HES"), 47 _("FIR"), 48 _("TSA"), 49 _("PHE"), 50 _("PER"), 51 _("ING"), 52 _("RAH"), 53 _("NL"), 54 ] 55 del _ 56 57
58 -def bosp_month_from_english_name(month_name):
59 return BOSP_ENGLISH_MONTH_NAMES.index(month_name) + 1
60 61
62 -def bosp_name_of_month(month):
63 return _(BOSP_ENGLISH_MONTH_NAMES[month - 1])
64 65
66 -def bosp_abbreviated_name_of_month(month):
67 return _(BOSP_ABBREVIATED_ENGLISH_MONTH_NAMES[month - 1])
68 69
70 -def bosp_month_from_abbreviated_name(month_name):
71 i = 0 72 for mn in BOSP_ABBREVIATED_ENGLISH_MONTH_NAMES: 73 i += 1 74 if _(mn) == month_name: 75 return i 76 return 13
77