Skip to content

Instantly share code, notes, and snippets.

@AldoMX
Last active January 1, 2023 03:13
Show Gist options
  • Save AldoMX/bb1875574ce90c1626ee7e204691c140 to your computer and use it in GitHub Desktop.
Save AldoMX/bb1875574ce90c1626ee7e204691c140 to your computer and use it in GitHub Desktop.
Días de los años 2000 a 2023 en que las entidades financieras sujetas a la supervisión de la Comisión Nacional Bancaria y de Valores (México) deberán cerrar sus puertas y suspender operaciones.
# Días de los años 2000 a 2023 en que las entidades financieras sujetas a la
# supervisión de la Comisión Nacional Bancaria y de Valores (México) deberán
# cerrar sus puertas y suspender operaciones.
#
# Archivo en formato TOML creado por Aldo Fregoso, publicado como obra de
# dominio público y ofrecido sin garantía ni soporte de ningún tipo.
#
# ===
#
# English: Mexico’s Bank Holidays from 2000 to 2023.
#
# TOML file created by Aldo Fregoso and released under public domain without
# any kind of warranty or support.
[MX]
since = 2019
last_update = 2022-11-28
days = [
# Array of shape `[ holiday_id, strategy, payload ]`. `strategy` can contain
# one of the following:
#
# - `day`: the exact day
# - `weekday`: every weekday (ex. "SA" for Saturday or "SU" for Sunday)
# - `weekday_nth`: 1-indexed day of the month (ex. `[1, "MO"]` is 1st Monday)
# - `weekday_easter`: weekday from easter, see my implementation of
# `oBeirnesEasterAlgo` here:
# https://gist.github.com/AldoMX/7f226012529cacb0ed2308166c4ee71a
#
[ "INT_NEW_YEARS_DAY", "day", { day = 1, month = 1 } ],
[ "MX_CONSTITUTIONS_DAY", "weekday_nth", { nth = [1, "MO"], month = 2 } ],
[ "MX_JUAREZ_DAY", "weekday_nth", { nth = [3, "MO"], month = 3 } ],
[ "INT_MAUNDY_THURSDAY", "weekday_easter", "TH" ],
[ "INT_GOOD_FRIDAY", "weekday_easter", "FR" ],
[ "INT_WORKERS_DAY", "day", { day = 1, month = 5 } ],
[ "MX_INDEPENDENCE_DAY", "day", { day = 16, month = 9 } ],
[ "INT_ALL_SOULS_DAY", "day", { day = 2, month = 11 } ],
[ "MX_REVOLUTION_DAY", "weekday_nth", { nth = [3, "MO"], month = 11 } ],
[ "INT_LADY_GUADALUPE_DAY", "day", { day = 12, month = 12 } ],
[ "INT_CHRISTMAS_DAY", "day", { day = 25, month = 12 } ],
[ "SATURDAY", "weekday", "SA" ],
[ "SUNDAY", "weekday", "SU" ],
]
log = [
# To calculate years 2000 to 2018 you should apply the following changes to
# the `days` array. The changes should be applied in descending order, for
# ex. to get year 2000 you should apply every change from 2018, then 2017,
# then 2012, etc., until year 2000:
#
{ year = 2018, action = "add", payload = [ "MX_ELECTION_DAY", "day", { day = 1, month = 7 } ] },
{ year = 2018, action = "add", payload = [ "MX_INAUGURATION_DAY", "day", { day = 1, month = 12 } ] },
{ year = 2017, action = "remove", payload = "MX_ELECTION_DAY" },
{ year = 2017, action = "remove", payload = "MX_INAUGURATION_DAY" },
{ year = 2012, action = "add", payload = [ "MX_ELECTION_DAY", "day", { day = 1, month = 7 } ] },
{ year = 2012, action = "add", payload = [ "MX_INAUGURATION_DAY", "day", { day = 1, month = 12 } ] },
{ year = 2011, action = "remove", payload = "MX_ELECTION_DAY" },
{ year = 2011, action = "remove", payload = "MX_INAUGURATION_DAY" },
{ year = 2010, action = "add", payload = [ "MX_INDEPENDENCE_200TH_DAY", "day", { day = 17, month = 9 } ] },
{ year = 2009, action = "remove", payload = "MX_INDEPENDENCE_200TH_DAY" },
{ year = 2006, action = "replace", payload = [ "MX_JUAREZ_DAY", "day", { day = 21, month = 3 } ] },
{ year = 2006, action = "add", payload = [ "MX_INAUGURATION_DAY", "day", { day = 1, month = 12 } ] },
{ year = 2005, action = "replace", payload = [ "MX_CONSTITUTIONS_DAY", "day", { day = 5, month = 2 } ] },
{ year = 2005, action = "remove", payload = "INT_ALL_SOULS_DAY" },
{ year = 2005, action = "replace", payload = [ "MX_REVOLUTION_DAY", "day", { day = 20, month = 11 } ] },
{ year = 2005, action = "remove", payload = "MX_INAUGURATION_DAY" },
{ year = 2000, action = "add", payload = [ "MX_BATTLE_OF_PUEBLA_DAY", "day", { day = 5, month = 5 } ] },
{ year = 2000, action = "add", payload = [ "INT_ALL_SOULS_DAY", "day", { day = 2, month = 11 } ] },
{ year = 2000, action = "add", payload = [ "MX_INAUGURATION_DAY", "day", { day = 1, month = 12 } ] },
# good luck in your journey from 1999 to earlier fellow time traveler
{ year = 1999, action = "remove", payload = "MX_INAUGURATION_DAY" },
]
[MX.sources]
2023 = [[2022-11-28, "https://sidof.segob.gob.mx/notas/5672531"]]
2022 = [[2021-12-24, "https://sidof.segob.gob.mx/notas/5639317"]]
2021 = [[2020-12-10, "https://sidof.segob.gob.mx/notas/5607227"]]
2020 = [[2019-12-20, "https://sidof.segob.gob.mx/notas/5582495"]]
2019 = [[2018-12-11, "https://sidof.segob.gob.mx/notas/5546178"]]
2018 = [[2017-12-18, "https://sidof.segob.gob.mx/notas/5508103"]]
2017 = [[2016-12-20, "https://sidof.segob.gob.mx/notas/5466056"]]
2016 = [[2015-12-22, "https://sidof.segob.gob.mx/notas/5420967"]]
2015 = [[2014-12-29, "https://sidof.segob.gob.mx/notas/5377596"]]
2014 = [[2013-12-13, "https://sidof.segob.gob.mx/notas/5326551"]]
2013 = [[2012-12-17, "https://sidof.segob.gob.mx/notas/5282546"]]
2012 = [[2011-12-20, "https://sidof.segob.gob.mx/notas/5225255"]]
2011 = [[2010-12-10, "https://sidof.segob.gob.mx/notas/5170638"]]
2010 = [
[2009-12-16, "https://sidof.segob.gob.mx/notas/5124899"],
[2010-09-13, "https://sidof.segob.gob.mx/notas/5159251"],
]
2009 = [[2008-12-26, "https://sidof.segob.gob.mx/notas/5075842"]]
2008 = [[2007-12-14, "https://sidof.segob.gob.mx/notas/5010425"]]
2007 = [[2006-11-29, "https://sidof.segob.gob.mx/notas/4938942"]]
2006 = [
[2005-12-15, "https://sidof.segob.gob.mx/notas/2102331"],
[2006-01-25, "https://sidof.segob.gob.mx/notas/4913167"],
]
2005 = [[2004-12-20, "https://sidof.segob.gob.mx/notas/754230"]]
2004 = [[2003-12-15, "https://sidof.segob.gob.mx/notas/685312"]]
2003 = [[2002-12-31, "https://sidof.segob.gob.mx/notas/717572"]]
2002 = [[2001-12-19, "https://sidof.segob.gob.mx/notas/757314"]]
2001 = [[2000-12-29, "https://sidof.segob.gob.mx/notas/2065337"]]
2000 = [[1999-12-30, "https://sidof.segob.gob.mx/notas/4958925"]]
[translations.en]
INT_ALL_SOULS_DAY = "All Souls’ Day"
INT_CHRISTMAS_DAY = "Christmas"
INT_GOOD_FRIDAY = "Good Friday"
INT_LADY_GUADALUPE_DAY = "Our Lady of Guadalupe"
INT_MAUNDY_THURSDAY = "Maundy Thursday"
INT_NEW_YEARS_DAY = "New Year’s Day"
INT_WORKERS_DAY = "Workers’ Day"
MX_BATTLE_OF_PUEBLA_DAY = "Cinco de Mayo (MX)"
MX_CONSTITUTIONS_DAY = "1917 Constitution’s Day (MX)"
MX_ELECTION_DAY = "Election Day (MX)"
MX_INAUGURATION_DAY = "Inauguration Day (MX)"
MX_INDEPENDENCE_200TH_DAY = "Bicentennial Independence Day (MX)"
MX_INDEPENDENCE_DAY = "Independence Day (MX)"
MX_JUAREZ_DAY = "Benito Juárez’s Day (MX)"
MX_REVOLUTION_DAY = "Revolution Day (MX)"
[translations.es]
INT_ALL_SOULS_DAY = "Día de los Fieles Difuntos"
INT_CHRISTMAS_DAY = "Navidad"
INT_GOOD_FRIDAY = "Viernes Santo"
INT_LADY_GUADALUPE_DAY = "Nuestra Señora de Guadalupe"
INT_MAUNDY_THURSDAY = "Jueves Santo"
INT_NEW_YEARS_DAY = "Año Nuevo"
INT_WORKERS_DAY = "Día de los Trabajadores"
MX_BATTLE_OF_PUEBLA_DAY = "Batalla de Puebla"
MX_CONSTITUTIONS_DAY = "Constitución de 1917"
MX_ELECTION_DAY = "Elecciones Federales"
MX_INAUGURATION_DAY = "Toma de Posesión"
MX_INDEPENDENCE_200TH_DAY = "Bicentenario de la Independencia de México"
MX_INDEPENDENCE_DAY = "Independencia de México"
MX_JUAREZ_DAY = "Natalicio de Benito Juárez"
MX_REVOLUTION_DAY = "Día de la Revolución Mexicana"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment