otime

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OTime

type OTime struct {
	time.Time
}

func Now

func Now(timezone string) OTime

func Parse

func Parse(value string) (OTime, error)

func (OTime) GetDate

func (ct OTime) GetDate(timezone string) OTime

GetDate returns date with format like "20060102"

func (OTime) GetDateString

func (ct OTime) GetDateString() string

func (OTime) GetTime

func (ct OTime) GetTime(timezone string) OTime

GetTime returns time with format like "15:04"

func (OTime) GetTimeString

func (ct OTime) GetTimeString() string

func (OTime) GetTimeWithSeconds

func (ct OTime) GetTimeWithSeconds(timezone string) OTime

GetTimeWithSeconds returns time with format like "15:04:05"

func (OTime) MarshalJSON

func (ct OTime) MarshalJSON() ([]byte, error)

func (*OTime) UnmarshalJSON

func (ct *OTime) UnmarshalJSON(b []byte) (err error)

Jump to

Keyboard shortcuts

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