forked from workalendar/workalendar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://pt.wikipedia.org/wiki/Feriados_em_Angola http://www.consuladogeral-angola.pt/feriados-nacionais/ Issue workalendar#276
- Loading branch information
Showing
5 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,6 +144,7 @@ Africa | |
------ | ||
|
||
* Algeria | ||
* Angola | ||
* Benin | ||
* Ivory Coast | ||
* Madagascar | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import (absolute_import, division, print_function, | ||
unicode_literals) | ||
from datetime import timedelta | ||
from workalendar.core import WesternCalendar | ||
from workalendar.core import ChristianMixin | ||
from workalendar.registry import iso_register | ||
|
||
|
||
@iso_register('AO') | ||
class Angola(WesternCalendar, ChristianMixin): | ||
name = 'Angola' | ||
|
||
include_good_friday = True | ||
include_easter_sunday = True | ||
include_christmas = True | ||
include_all_souls = True | ||
|
||
FIXED_HOLIDAYS = WesternCalendar.FIXED_HOLIDAYS + ( | ||
(2, 4, "Dia do Inicio da Luta Armada"), | ||
(3, 8, "Dia Internacional da Mulher"), | ||
(4, 4, "Dia da Paz"), | ||
(5, 1, "Dia Internacional do Trabalhador"), | ||
(9, 17, "Dia do Fundador da Nação e do Herói Nacional"), | ||
(11, 11, "Dia da Independência Nacional"), | ||
) | ||
|
||
def get_variable_entrudo(self, year): | ||
easter_sunday = self.get_easter_sunday(year) | ||
return easter_sunday - timedelta(days=47) | ||
|
||
def get_variable_days(self, year): | ||
days = super(Angola, self).get_variable_days(year) | ||
days.append((self.get_variable_entrudo(year), "Dia de Carnaval")) | ||
return days |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters