mx

package
v2.1.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package mx provides holiday definitions for Mexico.

Index

Constants

This section is empty.

Variables

View Source
var (

	// NewYear represents New Year's Day on 1-Jan
	NewYear = aa.NewYear.Clone(&cal.Holiday{Name: "New Year's Day", Type: cal.ObservancePublic, Observed: weekendAlt})

	// ConstitutionDay represents Constitution Day on 5-Feb
	ConstitutionDay = &cal.Holiday{
		Name:     "Constitution Day",
		Type:     cal.ObservancePublic,
		Month:    time.February,
		Day:      5,
		Observed: weekendAlt,
		Func:     cal.CalcDayOfMonth,
	}

	// BenitoJuarezDay represents Benito Juárez's Birthday Day on 21-Mar
	BenitoJuarezDay = &cal.Holiday{
		Name:     "Benito Juárez's Birthday",
		Type:     cal.ObservancePublic,
		Month:    time.March,
		Day:      21,
		Observed: weekendAlt,
		Func:     cal.CalcDayOfMonth,
	}

	// LabourDay represents Labour Day on 1-May
	LabourDay = &cal.Holiday{
		Name:     "Labour Day",
		Type:     cal.ObservancePublic,
		Month:    time.May,
		Day:      1,
		Observed: weekendAlt,
		Func:     cal.CalcDayOfMonth,
	}

	// IndependenceDay represents Independence Day on 16-Sep
	IndependenceDay = &cal.Holiday{
		Name:     "Independence Day",
		Type:     cal.ObservancePublic,
		Month:    time.September,
		Day:      16,
		Observed: weekendAlt,
		Func:     cal.CalcDayOfMonth,
	}

	// RevolutionDay represents Revolution Day on the 3rd Monday in November
	RevolutionDay = &cal.Holiday{
		Name:    "Revolution Day",
		Type:    cal.ObservancePublic,
		Month:   time.November,
		Offset:  3,
		Weekday: time.Monday,
		Func:    cal.CalcWeekdayOffset,
	}

	// ChristmasDay represents Christmas Day on 25-Dec
	ChristmasDay = aa.ChristmasDay.Clone(&cal.Holiday{Name: "Christmas Day", Type: cal.ObservanceBank, Observed: weekendAlt})

	// Holidays provides a list of the standard national holidays
	Holidays = []*cal.Holiday{
		NewYear,
		ConstitutionDay,
		BenitoJuarezDay,
		LabourDay,
		IndependenceDay,
		RevolutionDay,
		ChristmasDay,
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL