utils

package
v0.0.0-...-b20cf4f Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(arr []string, cond func(string) bool) []string

func Find

func Find(arr []string, cond func(string) bool) bool

func Parse

func Parse(value string) (int, int, int)

Types

type DateTime

type DateTime struct {
	Minute int
	Hour   int
	Day    int
	Month  time.Month
	Year   int
}

func (DateTime) ToString

func (p DateTime) ToString() string

type Period

type Period struct {
	Weekdays []time.Weekday
	Start    DateTime
	End      DateTime
}

func (Period) ActiveIn

func (p Period) ActiveIn(date time.Time) bool

func (Period) ToString

func (p Period) ToString() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳