Documentation ¶
Index ¶
- Constants
- Variables
- func DateTime(time int64) string
- func GetDateUnit(time int64) int64
- func GetDateUnitNow() int64
- func GetDelta() int64
- func GetFiveMinUnit(time int64) int64
- func GetMinUnit(time int64) int64
- func GetYmdTime(yyyyMMdd string) int64
- func HHMM(time int64) string
- func HHMMSS(time int64) string
- func IsSyncTime() bool
- func LPadInt(v, size int) string
- func Now() int64
- func SetDelta(t int64)
- func SetServerTime(serverTime int64, syncfactor float64) int64
- func StartSyncTime()
- func StopSyncTime()
- func SystemNow() int64
- func TimeStamp(time int64) string
- func TimeStampNow() string
- func WeekDay(time int64) string
- func YYYYMMDD(time int64) string
- func YmdNow() string
- func Ymdhms(time int64) string
- type DateFormat
- type DateTimeHelper
- type Day
Constants ¶
View Source
const ( DATEFORMAT_YEAR = 'y' DATEFORMAT_MONTH = 'm' DATEFORMAT_DAY = 'd' DATEFORMAT_HOUR = 'H' DATEFORMAT_MINUTE = 'M' DATEFORMAT_SECOND = 'S' DATEFORMAT_MILLISECOND = 's' )
View Source
const ( MILLIS_PER_SECOND = 1000 MILLIS_PER_MINUTE = 60 * MILLIS_PER_SECOND MILLIS_PER_FIVE_MINUTE = 5 * 60 * MILLIS_PER_SECOND MILLIS_PER_TEN_MINUTE = 10 * MILLIS_PER_MINUTE MILLIS_PER_HOUR = 60 * MILLIS_PER_MINUTE MILLIS_PER_DAY = 24 * MILLIS_PER_HOUR )
View Source
const (
TIME_SYNC_INTERVAL = 5000
)
Variables ¶
View Source
var SyncTimeMillis int64
Functions ¶
func GetDateUnit ¶
func GetDateUnitNow ¶
func GetDateUnitNow() int64
func GetFiveMinUnit ¶
func GetMinUnit ¶
func GetYmdTime ¶
func IsSyncTime ¶ added in v0.0.16
func IsSyncTime() bool
func SetServerTime ¶
func StartSyncTime ¶ added in v0.0.15
func StartSyncTime()
func StopSyncTime ¶ added in v0.0.15
func StopSyncTime()
func TimeStampNow ¶
func TimeStampNow() string
Types ¶
type DateFormat ¶
type DateFormat struct {
// contains filtered or unexported fields
}
func NewDateFormat ¶
func NewDateFormat(formatStr string) *DateFormat
func (*DateFormat) Format ¶
func (this *DateFormat) Format() string
func (*DateFormat) FormatTime ¶
func (this *DateFormat) FormatTime(t time.Time) string
type DateTimeHelper ¶
Click to show internal directories.
Click to hide internal directories.