datetime

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTimeformat = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

This section is empty.

Types

type DateTime

type DateTime struct {
	// contains filtered or unexported fields
}

DateTime DateTime

func New

func New(time time.Time, opts ...Option) *DateTime

NewDateTime 构建新的DateTime

func (*DateTime) Format

func (d *DateTime) Format() string

Format 默认2006-01-02 15:04:05

func (*DateTime) MarshalJSON

func (d *DateTime) MarshalJSON() (bytes []byte, err error)

MarshalJSON MarshalJSON

func (*DateTime) String

func (d *DateTime) String() string

String String

func (*DateTime) UnmarshalJSON

func (d *DateTime) UnmarshalJSON(bytes []byte) error

UnmarshalJSON UnmarshalJSON

type Option

type Option func(*options)

Jump to

Keyboard shortcuts

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