isodate

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 3 Imported by: 0

README

isodate

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IsoDate

type IsoDate struct {
	Time time.Time
}

func New

func New(time time.Time) IsoDate

func Parse

func Parse(value string) (IsoDate, error)

Parse to create a date from a string

func (IsoDate) Format

func (d IsoDate) Format(layout string) string

Format to format dates in a custom way

func (IsoDate) MarshalJSON

func (d IsoDate) MarshalJSON() ([]byte, error)

MarshalJSON to create a JSON

func (*IsoDate) Scan

func (d *IsoDate) Scan(value interface{}) error

Scan to read from SQL into variable, implements sql.Scan interface

func (IsoDate) String

func (d IsoDate) String() string

String to return string for IsoDate value, for example in HTML templates

func (*IsoDate) UnmarshalJSON

func (d *IsoDate) UnmarshalJSON(b []byte) error

UnmarshalJSON to read a JSON

func (IsoDate) Value

func (d IsoDate) Value() (driver.Value, error)

Value to write IsoDate value to SQL, implements sql.driver.Value interface

Jump to

Keyboard shortcuts

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