datetime

package
Version: v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InTimeSpan

func InTimeSpan(start, end, check time.Time) bool

InTimeSpan check time between start and end return boolean

func InTimeSpanEqual

func InTimeSpanEqual(start, end, check time.Time) bool

InTimeSpanEqual check time between start and end including check time. return boolean

Types

type Week

type Week struct {
	Days   []time.Time
	Year   int
	Number int
}

A Week is a main package data type

func NewWeek

func NewWeek(params ...int) (*Week, error)

NewWeek constructs new Week entity from given parameters (year and ISO-8601-compatible week number)

func (*Week) Next

func (week *Week) Next() (*Week, error)

Next calculates and returns information (year, week number and dates) about next week

func (*Week) Previous

func (week *Week) Previous() (*Week, error)

Previous calculates and returns information (year, week number and dates) about previous week

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL