package now
Import Path
github.com/jinzhu/now (on go.dev )
Dependency Relation
imports 3 packages , and imported by one package
Involved Source Files
d-> main.go
now.go
Exported Type Names
type
Now (struct)
Now now struct
Exported Fields (5)
Config *Config
Config .TimeFormats []string
Config .TimeLocation *time .Location
Config .WeekStartDay time .Weekday
Time time .Time
Exported Methods (62)
(T) Add (d time .Duration ) time .Time
(T) AddDate (years int , months int , days int ) time .Time
(T) After (u time .Time ) bool
(T) AppendFormat (b []byte , layout string ) []byte
(T) Before (u time .Time ) bool
(*T) BeginningOfDay () time .Time
(*T) BeginningOfHalf () time .Time
(*T) BeginningOfHour () time .Time
(*T) BeginningOfMinute () time .Time
(*T) BeginningOfMonth () time .Time
(*T) BeginningOfQuarter () time .Time
(*T) BeginningOfWeek () time .Time
(*T) BeginningOfYear () time .Time
(*T) Between (begin, end string ) bool
(T) Clock () (hour, min, sec int )
(T) Date () (year int , month time .Month , day int )
(T) Day () int
(*T) EndOfDay () time .Time
(*T) EndOfHalf () time .Time
(*T) EndOfHour () time .Time
(*T) EndOfMinute () time .Time
(*T) EndOfMonth () time .Time
(*T) EndOfQuarter () time .Time
(*T) EndOfSunday () time .Time
(*T) EndOfWeek () time .Time
(*T) EndOfYear () time .Time
(T) Equal (u time .Time ) bool
(T) Format (layout string ) string
(*T) GobDecode (data []byte ) error
(T) GobEncode () ([]byte , error )
(T) Hour () int
(T) ISOWeek () (year, week int )
(T) In (loc *time .Location ) time .Time
(T) IsZero () bool
(T) Local () time .Time
(T) Location () *time .Location
(T) MarshalBinary () ([]byte , error )
(T) MarshalJSON () ([]byte , error )
(T) MarshalText () ([]byte , error )
(T) Minute () int
(*T) Monday () time .Time
(T) Month () time .Month
(*T) MustParse (strs ...string ) (t time .Time )
(T) Nanosecond () int
(*T) Parse (strs ...string ) (t time .Time , err error )
(T) Round (d time .Duration ) time .Time
(T) Second () int
(T) String () string
(T) Sub (u time .Time ) time .Duration
(*T) Sunday () time .Time
(T) Truncate (d time .Duration ) time .Time
(T) UTC () time .Time
(T) Unix () int64
(T) UnixNano () int64
(*T) UnmarshalBinary (data []byte ) error
(*T) UnmarshalJSON (data []byte ) error
(*T) UnmarshalText (data []byte ) error
(T) Weekday () time .Weekday
(T) With (t time .Time ) *Now
(T) Year () int
(T) YearDay () int
(T) Zone () (name string , offset int )
Implements (7+)
T : encoding.BinaryMarshaler
*T : encoding.BinaryUnmarshaler
T : encoding.TextMarshaler
*T : encoding.TextUnmarshaler
T : encoding/json.Marshaler
*T : encoding/json.Unmarshaler
T : fmt.Stringer
As Outputs Of (3+)
func New (t time .Time ) *Now
func With (t time .Time ) *Now
func (*Config ).With (t time .Time ) *Now
Exported Values
func
Between (time1, time2
string )
bool
Between check now between the begin, end time or not
The pages are generated with Golds v0.1.6 . (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project and developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds .