mx

package
v2.1.35 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: BSD-3-Clause Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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