workingdays

package
v0.3.20 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package workingdays provides business day calculations ABOUTME: Working days calculator using US federal holidays ABOUTME: Supports checking working days, counting business days, adding business days

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBusinessDays

func AddBusinessDays(start time.Time, count int) time.Time

AddBusinessDays adds a specified number of business days to a date Returns the resulting date Supports negative counts (subtracts business days)

func BusinessDaysBetween

func BusinessDaysBetween(start, end time.Time) int

BusinessDaysBetween counts the number of business days between two dates (exclusive of start, inclusive of end) If end is before start, returns negative count

func IsWorkingDay

func IsWorkingDay(date time.Time) bool

IsWorkingDay checks if the given date is a working day (not weekend or holiday) Returns true if the date is a weekday and not a US federal holiday

func NextWorkingDay

func NextWorkingDay(from time.Time) time.Time

NextWorkingDay finds the next working day after the given date Returns the next working day (may be the next day, or several days later if holidays/weekends)

func PreviousWorkingDay

func PreviousWorkingDay(from time.Time) time.Time

PreviousWorkingDay finds the previous working day before the given date Returns the previous working day (may be the previous day, or several days earlier if holidays/weekends)

Types

This section is empty.

Jump to

Keyboard shortcuts

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