Documentation
¶
Index ¶
- func PFormatConv(pformat string) string
- type XTime
- func (k *XTime) DateStr() string
- func (k *XTime) DateTimeStr() string
- func (k *XTime) Format(format string) string
- func (k *XTime) PFormat(pformat string) string
- func (k *XTime) TimeStr() string
- func (k *XTime) Unix() int64
- func (k *XTime) UnixMilli() int64
- func (k *XTime) UnixNano() int64
- func (k *XTime) Weekday() int
- func (k *XTime) WeekdayStr(t ...int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type XTime ¶
XTime 2019-08-03 08:58:48.9967745 +0800 CST m=+0.040889401
func (*XTime) PFormat ¶
PFormat 返回时间字符串
Custom formatters :
"F": Long Month, "M": Month, "m": Zero Number Month, "n": Number Month, "Y": Long Year, "y": Year, "l": Long Day, "D": Day, "d": Long Number Day, "j": Number Day, "H": Long Hour, "G": Hour, "i": Long Minute, "s": Long Second,
func (*XTime) UnixNano ¶
fmt.Printf("时间戳(纳秒转换为秒):%v;\n",time.Now().UnixNano() / 1e9) UnixNano 时间戳(纳秒)
func (*XTime) WeekdayStr ¶
WeekdayStr 星期字符串 0 = { "星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" }; 1 = { "周日", "周一", "周二", "周三", "周四", "周五", "周六" }; 2 = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; 3 = { "sun", "mon", "tue", "wed", "thu", "fri", "sat" };
Click to show internal directories.
Click to hide internal directories.