utils

package
v0.0.0-...-e75809f Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: GPL-3.0 Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateExpectedSP

func CalculateExpectedSP(startDate time.Time, endDate time.Time, vacations float64, expectationPercent float64, allocationPercent float64, spPerWeek float64) float64

CalculateExpectedSP ...

func GetStartOfDay

func GetStartOfDay(t time.Time) time.Time

GetStartOfDay ...

func GetWorkingDaysBetweenTwoDates

func GetWorkingDaysBetweenTwoDates(startDate time.Time, endDate time.Time) int

GetWorkingDaysBetweenTwoDates calculates the working days between two dates, i.e., number of days between two dates excluding weekends

func InterfaceSliceToStringSlice

func InterfaceSliceToStringSlice(originalSlice []interface{}) []string

InterfaceSliceToStringSlice ...

func LogToSentry

func LogToSentry(err error)

LogToSentry ...

func ParseDateString

func ParseDateString(date string) (*time.Time, error)

ParseDateString parses a date string to time.Time

func RandToken

func RandToken() string

RandToken ...

func RemoveDuplicatesFromSlice

func RemoveDuplicatesFromSlice(list []string) []string

RemoveDuplicatesFromSlice ...

func StringSliceToInterfaceSlice

func StringSliceToInterfaceSlice(originalSlice []string) []interface{}

StringSliceToInterfaceSlice ...

func UIntInSlice

func UIntInSlice(element uint, slice []uint) bool

UIntInSlice ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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