date

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2022 License: MIT Imports: 4 Imported by: 0

README

date-go

Go Go Reference

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDateInvalid = errors.New("date invalid")
)

Functions

func FormatDateByDefault added in v0.4.0

func FormatDateByDefault(t time.Time, location *time.Location) string

Format time to default date format

func FormatDateTimeByDefault added in v0.4.0

func FormatDateTimeByDefault(t time.Time, location *time.Location) string

Format time to default date time format

func FromRFC3339

func FromRFC3339(rfc3339 string, location *time.Location) (string, error)

Convert RFC3339 to default custom date format

func SupportDateFormats added in v0.3.0

func SupportDateFormats() string

Return all support date formats For showing only

func ToDefaultDate added in v0.5.0

func ToDefaultDate(date string, location *time.Location) (string, error)

Whatever date format is, always return default date format

func ToRFC3339

func ToRFC3339(date string, location *time.Location) (string, error)

Convert YYYY/MM/DD and more to RFC3339

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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