values

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date struct {
	time.Time
}

Date is wrapper class of time.Time.

func DateFrom

func DateFrom(s string, utcFlag bool) (Date, error)

DateFrom returns Date instance from date string

func NewDate

func NewDate(tm time.Time) Date

NewDate returns Date instance from time.Time.

func Today

func Today(utcFlag bool) Date

Today returns Date instance in today.

func (Date) After

func (left Date) After(right Date) bool

After return true if left is not equal right and left > right.

func (Date) Before

func (left Date) Before(right Date) bool

Aftere return true if left is not equal right and left < right.

func (Date) Equal

func (left Date) Equal(right Date) bool

Equal return true if left equals right in year/month/day.

func (Date) MarshalJSON

func (t Date) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (Date) String

func (t Date) String() string

Stringer with YYYY-MM-DD format.

func (*Date) UnmarshalJSON

func (t *Date) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.UnmarshalJSON interface.

Jump to

Keyboard shortcuts

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