utils

package module
v0.0.0-...-06b4807 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TIME_BASE = time.Date(1582, time.October, 15, 0, 0, 0, 0, time.UTC).Unix()
)

Functions

func DateTime

func DateTime(format string, timestamp ...int64) string

func FixedZeoneSet

func FixedZeoneSet(offset int)

Useing the given time zone offset settings Location

func FixedZone

func FixedZone(offset int) *time.Location

Return a give time zone offset Settings (hours east of UTC) for example: UTC+8 = utils.FixedZone(8) or UTC-8 = utils.FixedZone(-8) UTC = utils.FixedZone(0)

func HasOr

func HasOr(has interface{}, then ...interface{}) interface{}

if the val is empty (IsEmpty) then ...

func InArray

func InArray(needle interface{}, haystack interface{}) (index int, exists bool)

func IsEmpty

func IsEmpty(val interface{}) bool

Returns true if has nil or false or 0 or ""

func LoadLocation

func LoadLocation(lc *time.Location)

func TimeZoneSet

func TimeZoneSet(name string) error

setting time zone

func Timezone

func Timezone() *time.Location

Return the *time.Location

Types

type Date

type Date struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL