Ejemplo n.º 1
0
    def sp_index(self, r):
        ### Is modified
        if self.projects[0]['_id'] == 'St_Miguel':
            cal = st_miguel()
            extra = cal.get_extras(r.year)
            if cal.is_holiday(r, extra):
                sp = 100

            else:
                if r.dayofweek == 6:
                    sp = 50
                else:
                    sp = 0
        else:
            cal = Greece()
            # {'New year','Epiphany','Clean Monday','Independence Day','Good Friday','Easter Saturday','Easter Sunday',
            # 'Easter Monday','Labour Day','Pentecost','Whit Monday','Assumption of Mary to Heaven','Ohi Day',
            # 'Christmas Eve','Christmas Day','Glorifying Mother of God','Last day of year'}
            if cal.is_holiday(r):
                sp = 100

            else:
                if r.dayofweek == 6:
                    sp = 50
                else:
                    sp = 0
        return sp
    def sp_index(self, r):
        ### Is modified
        cal = Greece()
        # {'New year','Epiphany','Clean Monday','Independence Day','Good Friday','Easter Saturday','Easter Sunday','Easter Monday','Labour Day','Pentecost','Whit Monday','Assumption of Mary to Heaven','Ohi Day','Christmas Eve'
        # ,'Christmas Day','Glorifying Mother of God','Last day of year'}
        if cal.is_holiday(r):
            sp = 100

        else:
            if r.dayofweek == 6:
                sp = 50
            else:
                sp = 0
        return sp