helpers

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToUnix

func ConvertToUnix(t time.Time) int64

func CreateDirectoryIfNotExists

func CreateDirectoryIfNotExists(dirPath string) error

func CreateFileIfNotExists

func CreateFileIfNotExists(filePath string)

func GetConfigFilePath

func GetConfigFilePath() string

func GetCurrentDate

func GetCurrentDate() time.Time

func GetDateCeil

func GetDateCeil(t time.Time) time.Time

func GetDateFloor

func GetDateFloor(t time.Time) time.Time

func GetHumanDate

func GetHumanDate(t time.Time) string

func GetMonthLongName

func GetMonthLongName(month time.Month) string

func GetNPrevWorkingDays

func GetNPrevWorkingDays(start time.Time, n int) []time.Time

Returns the next n working days from the given date (including the given date)

func GetStorageDir

func GetStorageDir(ts time.Time) string

func GetTimeFromUnix

func GetTimeFromUnix(ts int64) time.Time

func GetUUID

func GetUUID() string

func GetWorktrackDir

func GetWorktrackDir() string

func GetYesterdayDate

func GetYesterdayDate() time.Time

func IsNumber

func IsNumber(num string) (int, bool)

func IsThisMonth

func IsThisMonth(t time.Time) bool

func IsThisWeek

func IsThisWeek(t time.Time) bool

func IsThisYear

func IsThisYear(t time.Time) bool

func IsToday

func IsToday(t time.Time) bool

func NumberIsInRange

func NumberIsInRange(n int, min, max int) bool

func ParseDate

func ParseDate(date string) (time.Time, error)

func RemoveWhiteSpaces

func RemoveWhiteSpaces(s string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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