Documentation ¶
Index ¶
- Variables
- func AllStr(req int) string
- func CapitalOnly(req int) string
- func CheckProvincesData(orm *xorm.Engine)
- func FmtTime(stamp int64, format string) string
- func GetAllProvincesID(orm *xorm.Engine) (res []string)
- func GetDayUnix(date int64) int64
- func GetMonthUnix(date int64) int64
- func GetMonthWorkDay(date int64) int
- func GetNowUnix(format string) int64
- func GetYearAndMonth(date int64) (year, month int)
- func GetYearUnix(date int64) int64
- func IDnumGeneration(orm *xorm.Engine)
- func InsertProvinces(xrom *xorm.Engine, name string, code string, pId int64) int64
- func IsLeapYear(year int) bool
- func LowercaseOnly(req int) string
- func NoSpeStr(req int) string
- func NumberOnly(req int) string
- func Random(baseStr []string, req int) (res string)
- func SpeStrOnly(req int) string
- func StringRand(str string, req int) string
- func TimeToUnix(s string, format string) int64
- type ProvincesCode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Capital string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Lowercase string = "abcdefghijklmnopqrstuvwxyz" Number string = "0123456789" SpeStr string = "~!@#$%^&*()/-_+-=|{}[]<>?" )
View Source
var ( YearFmt = "2006" MonFmt = "2006-01" DayFmt = "2006-01-02" HourFmt = "2006-01-02 15" MinuteFmt = "2006-01-02 15:04" SecondFmt = "2006-01-02 15:04:56" MonthStr = [13]string{"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"} MonthDay = [13]int{29, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} )
View Source
var (
Specity = []string{
"北京市", "上海市", "天津市", "重庆市"}
)
Functions ¶
func CapitalOnly ¶
func CheckProvincesData ¶
func GetAllProvincesID ¶
func GetDayUnix ¶
func GetMonthUnix ¶
func GetMonthWorkDay ¶
func GetNowUnix ¶
func GetYearAndMonth ¶
func GetYearUnix ¶
func IDnumGeneration ¶
func InsertProvinces ¶
func IsLeapYear ¶
func LowercaseOnly ¶
func NumberOnly ¶
func SpeStrOnly ¶
func StringRand ¶
func TimeToUnix ¶
Types ¶
type ProvincesCode ¶
func NewProvincesCode ¶
func NewProvincesCode(name string, code string, pId int64) (obj *ProvincesCode)
Click to show internal directories.
Click to hide internal directories.