calendar

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBusinessDays

func AddBusinessDays(t time.Time, days int) time.Time

AddBusinessDays añade o resta días hábiles de lunes a viernes ignorando fines de semana. Preserva la hora local original del instante incluso cuando la aritmética atraviesa una transición de horario de verano (DST), garantizando correctitud temporal.

func DaysInMonth

func DaysInMonth(year int, month time.Month) int

DaysInMonth calcula la cantidad exacta de días que contiene un mes considerando bisiestos.

func EndOfDay

func EndOfDay(t time.Time) time.Time

EndOfDay devuelve el final del día (23:59:59.999999999) en la zona de la fecha.

func EndOfMonth

func EndOfMonth(t time.Time) time.Time

EndOfMonth devuelve el último nanosegundo del último día del mes correspondiente.

func EndOfWeek

func EndOfWeek(t time.Time) time.Time

EndOfWeek devuelve el domingo al final de la semana del instante dado.

func EndOfYear

func EndOfYear(t time.Time) time.Time

EndOfYear devuelve el último nanosegundo del último día del año del instante dado.

func IsWeekday

func IsWeekday(t time.Time) bool

IsWeekday indica si la fecha corresponde a un día laborable de lunes a viernes.

func IsWeekend

func IsWeekend(t time.Time) bool

IsWeekend indica si la fecha corresponde a sábado o domingo.

func StartOfDay

func StartOfDay(t time.Time) time.Time

StartOfDay devuelve el inicio del día (00:00:00.000000000) en la zona de la fecha.

func StartOfMonth

func StartOfMonth(t time.Time) time.Time

StartOfMonth devuelve el primer instante del primer día del mes (00:00:00).

func StartOfWeek

func StartOfWeek(t time.Time) time.Time

StartOfWeek devuelve el lunes de la semana del instante dado en la zona de la fecha.

func StartOfYear

func StartOfYear(t time.Time) time.Time

StartOfYear devuelve el primer instante del año del instante dado.

Types

This section is empty.

Jump to

Keyboard shortcuts

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