time包装类型增加String方法

This commit is contained in:
白茶清欢 2023-08-10 12:18:15 +08:00
parent b333760272
commit e9749e4844

View File

@ -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...)
}