Closed XaviTorello closed 8 years ago
Done!
Created new class OMIECalendar with REECalendar heritance
o=OMIECalendar()
o.holidays(2016)
See d9b714b33580270f7ef61da87116f4a8f7912be1
In [44]: o.holidays(2014) Out[44]: [(datetime.date(2014, 1, 1), 'New year'), (datetime.date(2014, 1, 6), 'Epiphany'), (datetime.date(2014, 4, 17), 'Holy Thursday'), (datetime.date(2014, 4, 18), 'Good Friday'), (datetime.date(2014, 5, 2), 'Workers Day next monday'), (datetime.date(2014, 5, 16), 'Second Easter monday'), (datetime.date(2014, 7, 25), 'St Santiago - Galicia National Day'), (datetime.date(2014, 8, 15), 'Assumption of Mary to Heaven'), (datetime.date(2014, 10, 12), 'National Day'), (datetime.date(2014, 11, 1), 'All Saints Day'), (datetime.date(2014, 12, 6), 'Constitution Day'), (datetime.date(2014, 12, 8), 'Immaculate Conception'), (datetime.date(2014, 12, 26), 'St Esteban')]
In [45]: o.holidays(2015) Out[45]: [(datetime.date(2015, 1, 1), 'New year'), (datetime.date(2015, 1, 6), 'Epiphany'), (datetime.date(2015, 4, 2), 'Holy Thursday'), (datetime.date(2015, 4, 3), 'Good Friday'), (datetime.date(2015, 5, 2), 'Workers Day next monday'), (datetime.date(2015, 5, 16), 'Second Easter monday'), (datetime.date(2015, 7, 25), 'St Santiago - Galicia National Day'), (datetime.date(2015, 8, 15), 'Assumption of Mary to Heaven'), (datetime.date(2015, 10, 12), 'National Day'), (datetime.date(2015, 11, 1), 'All Saints Day'), (datetime.date(2015, 12, 6), 'Constitution Day'), (datetime.date(2015, 12, 8), 'Immaculate Conception'), (datetime.date(2015, 12, 26), 'St Esteban')]
In [46]: o.holidays(2016) Out[46]: [(datetime.date(2016, 1, 1), 'New year'), (datetime.date(2016, 1, 6), 'Epiphany'), (datetime.date(2016, 3, 24), 'Holy Thursday'), (datetime.date(2016, 3, 25), 'Good Friday'), (datetime.date(2016, 5, 2), 'Workers Day next monday'), (datetime.date(2016, 5, 16), 'Second Easter monday'), (datetime.date(2016, 7, 25), 'St Santiago - Galicia National Day'), (datetime.date(2016, 8, 15), 'Assumption of Mary to Heaven'), (datetime.date(2016, 10, 12), 'National Day'), (datetime.date(2016, 11, 1), 'All Saints Day'), (datetime.date(2016, 12, 6), 'Constitution Day'), (datetime.date(2016, 12, 8), 'Immaculate Conception'), (datetime.date(2016, 12, 26), 'St Esteban')]
In [48]: o.holidays(2017) Out[48]: [(datetime.date(2017, 1, 1), 'New year'), (datetime.date(2017, 1, 6), 'Epiphany'), (datetime.date(2017, 4, 13), 'Holy Thursday'), (datetime.date(2017, 4, 14), 'Good Friday'), (datetime.date(2017, 5, 2), 'Workers Day next monday'), (datetime.date(2017, 5, 16), 'Second Easter monday'), (datetime.date(2017, 7, 25), 'St Santiago - Galicia National Day'), (datetime.date(2017, 8, 15), 'Assumption of Mary to Heaven'), (datetime.date(2017, 10, 12), 'National Day'), (datetime.date(2017, 11, 1), 'All Saints Day'), (datetime.date(2017, 12, 6), 'Constitution Day'), (datetime.date(2017, 12, 8), 'Immaculate Conception'), (datetime.date(2017, 12, 26), 'St Esteban')]
In [49]: o.holidays(2018) Out[49]: [(datetime.date(2018, 1, 1), 'New year'), (datetime.date(2018, 1, 6), 'Epiphany'), (datetime.date(2018, 3, 29), 'Holy Thursday'), (datetime.date(2018, 3, 30), 'Good Friday'), (datetime.date(2018, 5, 2), 'Workers Day next monday'), (datetime.date(2018, 5, 16), 'Second Easter monday'), (datetime.date(2018, 7, 25), 'St Santiago - Galicia National Day'), (datetime.date(2018, 8, 15), 'Assumption of Mary to Heaven'), (datetime.date(2018, 10, 12), 'National Day'), (datetime.date(2018, 11, 1), 'All Saints Day'), (datetime.date(2018, 12, 6), 'Constitution Day'), (datetime.date(2018, 12, 8), 'Immaculate Conception'), (datetime.date(2018, 12, 26), 'St Esteban')]
As agreed on #4:
OMIE Holidays
thxs @tinogis