date

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frozen

type Frozen struct {
	// contains filtered or unexported fields
}

Frozen is a date provider returning always the same date.

func NewFrozen

func NewFrozen(date time.Time) Frozen

func NewFrozenNow

func NewFrozenNow() Frozen

func (*Frozen) Date

func (n *Frozen) Date() time.Time

type Now

type Now struct{}

Now is a date provider returning the current date.

func (*Now) Date

func (n *Now) Date() time.Time

type Provider

type Provider interface {
	Date() time.Time
}

Provider returns a date instance.

Jump to

Keyboard shortcuts

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