Documentation ¶
Index ¶
- Constants
- func FindStringSubmatchMap(s, exp string) (map[string]string, bool)
- func FormatChineseDate(t time.Time) string
- func FormatChineseZDate(t time.Time) string
- func FormatDashTime(t time.Time) string
- func FormatDate(t time.Time) string
- func FormatDateTime(t time.Time) string
- func FormatGMT(t time.Time) string
- func FormatRFC3339(t time.Time) string
- func FormatRFC3339Nano(t time.Time) string
- func FormatTime(t time.Time) string
- func FormatZDate(t time.Time) string
- func GbkToUtf8(s []byte) ([]byte, error)
- func GetMonthDays(year, month int) int
- func GetTimeMonthDays(t time.Time) int
- func HideString(origin string, start, length int) string
- func IntToString(value interface{}) (string, error)
- func IsZero(t time.Time) bool
- func ParseStringByteSize(key string) *big.Int
- func ParseStringTime(s string, defValue ...time.Duration) time.Duration
- func QuoteBytesToASCIIWithoutBackslashed(bs []byte) string
- func QuoteToASCIIWithoutBackslashed(s string) string
- func RoundFund(fund float64) int64
- func StringToDate(t string) (time.Time, error)
- func StringToDateTime(t string) (time.Time, error)
- func ToFloat64(value interface{}) (float64, error)
- func ToInt(value interface{}) (int, error)
- func ToInt64(value interface{}) (int64, error)
- func UnixToTime(unix int64) time.Time
- func Utf8ToGbk(s []byte) ([]byte, error)
- type Int64s
- type Ints
- type Strings
- type Uint32s
- type Uints
Constants ¶
const ( Date = "2006-01-02" ZDate = "2006-1-2" DashTime = Date + "-15-04-05" DateTime = Date + " 15:04:05" Time = "15:04:05" ChineseDate = "2006年01月02日" ChineseZDate = "2006年1月2日" DefalutDateTime = "0001-01-01 00:00:00" )
Datas
const ( MonthLunarDays int = 30 MonthSolarDays int = 31 MonthFebLeapDays int = 29 MonthFebDays int = 28 )
MonthDays
Variables ¶
This section is empty.
Functions ¶
func FindStringSubmatchMap ¶
FindStringSubmatchMap infomation: returns a map of strings holding the text of the leftmost match of the regular expression in s and the matches, if any, of its subexpressions, as defined by the 'Submatch' description in the package comment. A return value of nil indicates no match.
func FormatChineseDate ¶
FormatChineseDate format chinese date string
func FormatChineseZDate ¶
FormatChineseZDate format chinese no 0 date string
func FormatDashTime ¶
FormatDashTime format datetime string with dash
func FormatRFC3339Nano ¶
FormatRFC3339Nano format RFC3339Nano string
func GetTimeMonthDays ¶
GetTimeMonthDays get time's month days
func HideString ¶
HideString hide some words origin: the string to be hidden start: from 1 to len(origin), replace * from beginning length: replace origin length from the beginning
func IntToString ¶
IntToString parse int to string
func ParseStringByteSize ¶
ParseStringByteSize return big size
func ParseStringTime ¶
ParseStringTime return time.Duration
func QuoteBytesToASCIIWithoutBackslashed ¶
QuoteBytesToASCIIWithoutBackslashed strconv.QuoteToASCII by bytes
func QuoteToASCIIWithoutBackslashed ¶
QuoteToASCIIWithoutBackslashed strconv.QuoteToASCII without Backslashed \\ import strconv
func StringToDate ¶
StringToDate paser string to date
func StringToDateTime ¶
StringToDateTime paser string to datetime