cusomdatetime

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CustomDateFormat = "2006-01-02"

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomDate

type CustomDate struct {
	time.Time
}

CustomDate used in validity Note: If we use CustomDate as time.Time alias. facing issue with gob encoding Issue: gob: type scheduler.CustomDate has no exported fields was used as "type CustomDate time.Time"

func (CustomDate) MarshalJSON

func (cd CustomDate) MarshalJSON() ([]byte, error)

MarshalJSON custom implementation

func (CustomDate) MarshalYAML

func (cd CustomDate) MarshalYAML() (interface{}, error)

MarshalYAML implementation

func (*CustomDate) Unmarshal

func (cd *CustomDate) Unmarshal(stringDate string) error

func (*CustomDate) UnmarshalJSON

func (cd *CustomDate) UnmarshalJSON(data []byte) error

UnmarshalJSON custom implementation

func (*CustomDate) UnmarshalYAML

func (cd *CustomDate) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implementation

type CustomTime

type CustomTime struct {
	time.Time
}

CustomTime used in validity

func (CustomTime) MarshalJSON

func (ct CustomTime) MarshalJSON() ([]byte, error)

MarshalJSON custom implementation

func (CustomTime) MarshalYAML

func (ct CustomTime) MarshalYAML() (interface{}, error)

MarshalYAML implementation

func (*CustomTime) Unmarshal

func (ct *CustomTime) Unmarshal(stringTime string) error

func (*CustomTime) UnmarshalJSON

func (ct *CustomTime) UnmarshalJSON(data []byte) error

UnmarshalJSON custom implementation

func (*CustomTime) UnmarshalYAML

func (ct *CustomTime) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implementation

Jump to

Keyboard shortcuts

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