time2

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 4 Imported by: 0

README

time2

time wrapper for golang.

Build Status Coverage Status Go Report Card Documentation

Install

$ go get github.com/lovego/time2

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Time

type Time struct {
	time.Time
}

func New

func New(year, month, day, hour, minute, second int) Time

func Now

func Now() Time

func NowPtr added in v0.0.3

func NowPtr() *Time

func Parse

func Parse(str string) (Time, error)
Example
fmt.Println(Parse("2019-09-12 12:01:02"))
Output:

2019-09-12 12:01:02 <nil>

func (Time) MarshalJSON

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

func (*Time) Scan

func (t *Time) Scan(value interface{}) error

func (Time) String

func (t Time) String() string

func (*Time) UnmarshalJSON

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

func (Time) Value

func (t Time) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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