Skip to content

Commit

Permalink
feature: 添加自定义time类型
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Apr 3, 2023
1 parent 77ab9f8 commit a4f8f8c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions time.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ func (t Time) String() string {
return t.Time().Format(DateTime)
}

func Now() Time {
return NewTime(time.Now())
}

func SetTimeLayout(layout string) {
DateTime = layout
}

0 comments on commit a4f8f8c

Please sign in to comment.