Documentation ¶
Index ¶
- type Format
- func (ztf Format) FormatTimeToSimpleMilliNoPoint(time time.Time) (string, error)
- func (ztf Format) FormatTimeToStr(time time.Time) string
- func (ztf Format) ParseSimpleMilliNoPointToTime(timeStr string) (time.Time, error)
- func (ztf Format) ParseStrToTime(timeStr string) (time.Time, error)
- func (ztf Format) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Format ¶ added in v0.0.3
type Format string
Format zctime时间格式
const ( TIME_FORMAT_SIMPLE Format = "20060102150405" // 简单格式: yyyyMMddHHmmss TIME_FORMAT_SLASH Format = "2006/01/02 15:04:05" // 斜杠格式: yyyy/MM/dd HH:mm:ss TIME_FORMAT_DASH Format = "2006-01-02 15:04:05" // 横杠格式: yyyy-MM-dd HH:mm:ss TIME_FORMAT_SIMPLE_MILLI Format = "20060102150405.000" // 带毫秒的简单格式: yyyyMMddHHmmss.SSS TIME_FORMAT_SLASH_MILLI Format = "2006/01/02 15:04:05.000" // 带毫秒的斜杠格式: yyyy/MM/dd HH:mm:ss.SSS TIME_FORMAT_DASH_MILLI Format = "2006-01-02 15:04:05.000" // 带毫秒的横杠格式: yyyy-MM-dd HH:mm:ss.SSS )
func (Format) FormatTimeToSimpleMilliNoPoint ¶ added in v0.0.3
FormatTimeToSimpleMilliNoPoint 将time转为带毫秒的简单格式字符串,并去除点
func (Format) FormatTimeToStr ¶ added in v0.0.3
FormatTimeToStr 将time转为Format指定格式的字符串
func (Format) ParseSimpleMilliNoPointToTime ¶ added in v0.0.3
ParseSimpleMilliNoPointToTime 将带毫秒的简单格式字符串(已去除点)转为time
func (Format) ParseStrToTime ¶ added in v0.0.3
ParseStrToTime 将Format指定格式的字符串转为time
Click to show internal directories.
Click to hide internal directories.