Documentation ¶
Index ¶
- Constants
- func AddMonthForUnix(month string, layout string, num int) int64
- func Date(tm time.Time) int64
- func DateToUnix(date string, format string) int64
- func FirstAndLastUnixOfMonth(month string, layout string) (s int64, e int64)
- func FirstAndLastUnixOfWeek(date int64) (s int64, e int64)
- func FirstAndLastUnixOfYear(month string, layout string) (s int64, e int64)
- func FirstDayOfMonth(month string, layout string) int
- func Float64ToString(f float64) string
- func FormatDate(date time.Time, dateStyle string) string
- func GetGuid() string
- func GetMd5String(s string) string
- func LastDayOfMonth(month string, layout string) int
- func Month(tm time.Time) int64
- func PathExists(path string) (bool, error)
- func SliceArray(size int, arr interface{}, beans interface{}) (error, interface{})
- func StringPadLeft(str, pad string, length int) string
- func StringPadRight(str, pad string, length int) string
- func StringToFloat64(s string) float64
- func UnixToDate(ts int64, format string) string
- func Year(tm time.Time) int64
Constants ¶
const ( MM_DD = "MM-dd" YYYYMM = "yyyyMM" YYYY_MM = "yyyy-MM" YYYY_MM_DD = "yyyy-MM-dd" YYYYMMDD = "yyyyMMdd" YYYYMMDDHHMMSS = "yyyyMMddHHmmss" YYYYMMDDHHMM = "yyyyMMddHHmm" YYYYMMDDHH = "yyyyMMddHH" YYMMDDHHMM = "yyMMddHHmm" MM_DD_HH_MM = "MM-dd HH:mm" MM_DD_HH_MM_SS = "MM-dd HH:mm:ss" YYYY_MM_DD_HH_MM = "yyyy-MM-dd HH:mm" YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss" YYYY_MM_DD_HH_MM_SS_SSS = "yyyy-MM-dd HH:mm:ss.SSS" MM_DD_EN = "MM/dd" YYYY_MM_EN = "yyyy/MM" YYYY_MM_DD_EN = "yyyy/MM/dd" MM_DD_HH_MM_EN = "MM/dd HH:mm" MM_DD_HH_MM_SS_EN = "MM/dd HH:mm:ss" YYYY_MM_DD_HH_MM_EN = "yyyy/MM/dd HH:mm" YYYY_MM_DD_HH_MM_SS_EN = "yyyy/MM/dd HH:mm:ss" YYYY_MM_DD_HH_MM_SS_SSS_EN = "yyyy/MM/dd HH:mm:ss.SSS" MM_DD_CN = "MM月dd日" YYYY_MM_CN = "yyyy年MM月" YYYY_MM_DD_CN = "yyyy年MM月dd日" MM_DD_HH_MM_CN = "MM月dd日 HH:mm" MM_DD_HH_MM_SS_CN = "MM月dd日 HH:mm:ss" YYYY_MM_DD_HH_MM_CN = "yyyy年MM月dd日 HH:mm" YYYY_MM_DD_HH_MM_SS_CN = "yyyy年MM月dd日 HH:mm:ss" HH_MM = "HH:mm" HH_MM_SS = "HH:mm:ss" HH_MM_SS_MS = "HH:mm:ss.SSS" )
Variables ¶
This section is empty.
Functions ¶
func AddMonthForUnix ¶
* @description: Return Add Month To Time String For Month @param month: time string @param layout: time format e.g. 2006-01-02 15:04:05 @param num: add nums @return: Timespan
func DateToUnix ¶
* @description: Return Time Year's Timespan @param date: time string @param format: time format @return: timespan
func FirstAndLastUnixOfMonth ¶
* @description: Return First Day And Last Day of Month @param month: time string @param layout: time format e.g. 2006-01-02 15:04:05 @return: Timespan
func FirstAndLastUnixOfWeek ¶
* @description: Return First Day And Last Day of Week @param date: timespan @return: Week's First TimeSpan and Last TimeSpan
func FirstAndLastUnixOfYear ¶
* @description: Return First Day And Last Day of Year @param month: time string @param layout: time format e.g. 2006-01-02 15:04:05 @return: Timespan
func FirstDayOfMonth ¶
* @description: Return First Day of Month @param month: time string @param layout: time format e.g. 2006-01-02 15:04:05 @return: Timespan
func Float64ToString ¶
* @description:Float64 To String @param f: Float64 @return: string
func FormatDate ¶
* @description: FormatDate By dateStyle @param date: time @param dateStyle: dateStyle @return: Format String
func GetMd5String ¶
* @description: Get 32 byte MD5 @param s: string @return: string
func LastDayOfMonth ¶
* @description: Return Last Day of Month @param month: time string @param layout: time format e.g. 2006-01-02 15:04:05 @return: Timespan
func PathExists ¶
func SliceArray ¶
func StringPadLeft ¶
* @description:Add Pad At The Start of String Util The Length of String Equals length @param str: The Original String @param pad: The Added String @param length: total length of string @return: string
func StringPadRight ¶
* @description:Add Pad At The End of String Util The Length of String Equals length @param str: The Original String @param pad: The Added String @param length: total length of string @return: string
func StringToFloat64 ¶
* @description: String To Float64 @param s: string @return: Float64
func UnixToDate ¶
* @description: Return Timespan's Format String @param ts: timespasn @param format: time format e.g. 2006-01-02 15:04:05 @return: Timespan
Types ¶
This section is empty.