dateHelpers

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMonthAndAdjust added in v1.2.72

func AddMonthAndAdjust(startDate time.Time, noMonths int) time.Time

AddMonthAndAdjust adds 1 calendar month and adjusts to the next weekday if needed

func AddWorkingDays added in v1.2.72

func AddWorkingDays(startDate time.Time, daysToAdd int) time.Time

AddWorkingDays adds n working days (excluding weekends) to a given date

func AdjustToNextWorkingday added in v1.2.72

func AdjustToNextWorkingday(date time.Time) time.Time

AdjustToNextWorkingday moves the date forward to the next weekday if it's a weekend

func EndOfDay

func EndOfDay(t time.Time) time.Time

func FormatAudit

func FormatAudit(in time.Time) string

func FormatCalendar

func FormatCalendar(in time.Time) string

func FormatDMY

func FormatDMY(in time.Time) string

func FormatHuman

func FormatHuman(t time.Time) string

func FormatHumanFromString

func FormatHumanFromString(in string) (time.Time, error)

func FormatYMD

func FormatYMD(in time.Time) string

func IsAfterOrEqualTo

func IsAfterOrEqualTo(t1, t2 time.Time) bool

func IsBeforeOrEqualTo

func IsBeforeOrEqualTo(t1, t2 time.Time) bool

func IsWorkingDay added in v1.2.72

func IsWorkingDay(t time.Time) bool

func StartOfDay

func StartOfDay(t time.Time) time.Time

Types

type DateFormat

type DateFormat struct {
	External     string
	DMY          string
	Internal     string
	Detail       string
	YMD          string
	Calendar     string
	BackupDate   string
	BackupFolder string
}
var Format DateFormat

Jump to

Keyboard shortcuts

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