dates

package
v0.0.74 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2021 License: MIT Imports: 1 Imported by: 6

Documentation

Index

Constants

View Source
const (
	DateFormatDashYYYYMMDD           = "2006-01-02"
	DateFormatPointDDMMYYYY          = "02.01.2006"
	DateTimeFormatDashYYYYMMDDHHmmss = "2006-01-02 15:04:05"
	DateTimeFormat1C                 = "2006-01-02T15:04:05"
)
View Source
const (
	WeekDays  = 7
	MonthDays = 31
	YearDays  = 365
)

Variables

This section is empty.

Functions

func AfterPeriod

func AfterPeriod(t time.Time, period int64, measure time.Duration) time.Time

func BeforePeriod

func BeforePeriod(t time.Time, period int64, measure time.Duration) time.Time

func BeginOfDay

func BeginOfDay(t time.Time) time.Time

func BeginOfNextDay

func BeginOfNextDay(t time.Time) time.Time

func BeginOfNextWeek

func BeginOfNextWeek(t time.Time) time.Time

func BeginOfPrevDay

func BeginOfPrevDay(t time.Time) time.Time

func BeginOfPrevWeek

func BeginOfPrevWeek(t time.Time) time.Time

Types

type DateTimeDiff

type DateTimeDiff struct {
	Year  int
	Month int
	Day   int
	Hour  int
	Min   int
	Sec   int
}

func Diff

func Diff(a, b time.Time) *DateTimeDiff

func (*DateTimeDiff) InSeconds

func (dd *DateTimeDiff) InSeconds() int64

Jump to

Keyboard shortcuts

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