dates

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rfc2822Time

type Rfc2822Time struct {
	time.Time
}

Rfc2822Time is meant to allow access to time.Time but successfully parse the RFC 2822 date format into a struct easily.

func (Rfc2822Time) MarshalJSON

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

MarshalJSON handles converting a Rfc2822Time struct into the proper string representation when being serialized to JSON.

func (*Rfc2822Time) String

func (t *Rfc2822Time) String() string

func (*Rfc2822Time) UnmarshalJSON

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

UnmarshalJSON handles converting a string that is hopefully in the RFC 2822 date format into a usable struct with access to the time.Time functions.

Jump to

Keyboard shortcuts

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