calcdate

package module
v0.0.0-...-12ceff0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFormat

func ApplyFormat(fmtstr string, date time.Time) string

ApplyFormat return a string representing the date date formtted by fmtstr Fields recognized : YYYY MM DD hh mm ss

func CheckDateFormat

func CheckDateFormat(adate string, format string) bool

CheckDateFormat check that format and adate share the same format

func CreateDate

func CreateDate(adate string, ifmt string, tz string, begindate bool, enddate bool) (time.Time, error)

CreateDate returns a time.Time object represented by the parameters adate formatted with ifmt. If enddate is true, the time returned will ...

func DayInMonth

func DayInMonth(year int, month int) int

DayInMonth return the number of days in the month/year given in parameters

func DoubleReplace

func DoubleReplace(fmtstr string, keyword string, scanfformat string, data int) string

DoubleReplace replaces keyword by a string representing a scanfformat (like %2d) in the string fmtstr. Finally the scanfformat is expandined to data

func IndexArray

func IndexArray(array []string, searchValue string) int

IndexArray search a value in an array of string and returns its index

func SplitDate

func SplitDate(ddate string) []string

SplitDate split a string which has format like // ::

Types

This section is empty.

Jump to

Keyboard shortcuts

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