time包装类型增加String方法
This commit is contained in:
parent
b333760272
commit
e9749e4844
4
time.go
4
time.go
@ -135,12 +135,12 @@ func (t *Time) FormatUnixSec(layout ...string) string {
|
||||
return time.Unix(t.Unix(), 0).In(time.Local).Format(t.getTimeFormat(StandTimeFormat, layout...))
|
||||
}
|
||||
|
||||
// String 转字符串
|
||||
// ToString 转字符串
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 12:16 2023/8/10
|
||||
func (t *Time) String(layout ...string) string {
|
||||
func (t *Time) ToString(layout ...string) string {
|
||||
return t.FormatUnixSec(layout...)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user