bg

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

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: "Нова година", Type: cal.ObservancePublic, Observed: weekendAlt})

	// LiberationDay represents Liberation Day on 3-Mar
	LiberationDay = &cal.Holiday{
		Name:     "Ден на Освобождението на България от османско иго - национален празник",
		Type:     cal.ObservancePublic,
		Month:    time.March,
		Day:      3,
		Func:     cal.CalcDayOfMonth,
		Observed: weekendAlt,
	}

	// GoodFriday represents Good Friday - two days before Easter
	OrthodoxGoodFriday = &cal.Holiday{
		Name:   "Велики петък",
		Type:   cal.ObservancePublic,
		Offset: -2,
		Julian: true,
		Func:   cal.CalcEasterOffset,
	}

	// EasterMonday represents Easter Monday on the day after Easter
	OrthodoxEasterMonday = &cal.Holiday{
		Name:   "Великден",
		Type:   cal.ObservancePublic,
		Offset: 1,
		Julian: true,
		Func:   cal.CalcEasterOffset,
	}

	// LabourDay represents Labour Day on 1-May
	LabourDay = &cal.Holiday{
		Name:  "Ден на труда и на международната работническа солидарност",
		Type:  cal.ObservancePublic,
		Month: time.May,
		Day:   1,
		Func: func(h *cal.Holiday, year int) time.Time {

			easter := cal.CalcEasterOffset(OrthodoxGoodFriday, year)
			labourDay := cal.CalcDayOfMonth(h, year)
			daysDiff := labourDay.Sub(easter).Hours() / 24
			if daysDiff >= 0 && daysDiff <= 2 {
				holiday := *h
				holiday.Offset = 2
				holiday.Julian = true
				return cal.CalcEasterOffset(&holiday, year)
			}
			return labourDay
		},
		Observed: weekendAlt,
	}

	// StGeorgesDay represents St. George's Day on 6-May
	StGeorgesDay = &cal.Holiday{
		Name:     "Гергьовден, Ден на храбростта и Българската армия",
		Type:     cal.ObservancePublic,
		Month:    time.May,
		Day:      6,
		Func:     cal.CalcDayOfMonth,
		Observed: weekendAlt,
	}

	// StCyrilAndMethodiusDay represents St. Cyril and St. Methodius Day on 24-May
	StCyrilAndMethodiusDay = &cal.Holiday{
		Name:     "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност",
		Type:     cal.ObservancePublic,
		Month:    time.May,
		Day:      24,
		Func:     cal.CalcDayOfMonth,
		Observed: weekendAlt,
	}

	// UnificationDay represents Unification Day on 6-Sep
	UnificationDay = &cal.Holiday{
		Name:     "Ден на Съединението",
		Type:     cal.ObservancePublic,
		Month:    time.September,
		Day:      6,
		Func:     cal.CalcDayOfMonth,
		Observed: weekendAlt,
	}

	// IndependenceDay represents Independence Day on 22-Sep
	IndependenceDay = &cal.Holiday{
		Name:     "Ден на Независимостта на България",
		Type:     cal.ObservancePublic,
		Month:    time.September,
		Day:      22,
		Func:     cal.CalcDayOfMonth,
		Observed: weekendAlt,
	}

	// ChristmasEve represents Christmas Eve 24-Dec
	ChristmasEve = &cal.Holiday{
		Name:     "Бъдни вечер",
		Type:     cal.ObservancePublic,
		Month:    time.December,
		Day:      24,
		Func:     cal.CalcDayOfMonth,
		Observed: weekendAlt,
	}

	// ChristmasDay represents Christmas Day on 25-Dec
	ChristmasDay = aa.ChristmasDay.Clone(&cal.Holiday{Name: "Коледа", Type: cal.ObservancePublic, Observed: []cal.AltDay{
		{Day: time.Saturday, Offset: 2},
		{Day: time.Sunday, Offset: 2},
	}})

	// ChristmasDay2 represents Christmas Day 2 on 26-Dec
	ChristmasDay2 = aa.ChristmasDay2.Clone(&cal.Holiday{Name: "Коледа 2", Type: cal.ObservancePublic, Observed: []cal.AltDay{
		{Day: time.Saturday, Offset: 2},
		{Day: time.Sunday, Offset: 2},
		{Day: time.Monday, Offset: 2},
		{Day: time.Tuesday, Offset: 1}}})

	// Holidays provides a list of the standard national holidays
	Holidays = []*cal.Holiday{
		NewYear,
		LiberationDay,
		OrthodoxGoodFriday,
		OrthodoxEasterMonday,
		LabourDay,
		StGeorgesDay,
		StCyrilAndMethodiusDay,
		UnificationDay,
		IndependenceDay,
		ChristmasEve,
		ChristmasDay,
		ChristmasDay2,
	}
)

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