periods

package
v0.0.0-...-6dce122 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const FormatHourAndMinute = "15:04"

Variables

This section is empty.

Functions

This section is empty.

Types

type Period

type Period struct {
	StartHour   int `json:"start_hour"`
	StartMinute int `json:"start_minute"`
	EndHour     int `json:"end_hour"`
	EndMinute   int `json:"end_minute"`
}

type Periods

type Periods []*Period

func ParsePeriods

func ParsePeriods(s string) (Periods, error)

ParsePeriods parse string in importing db services csv column like: 09:30-11:30;11:30-13:30;20:30-21:30 to *Periods

func (*Periods) Copy

func (r *Periods) Copy() Periods

func (*Periods) IsWithinScope

func (r *Periods) IsWithinScope(executeTime time.Time) bool

func (*Periods) Scan

func (r *Periods) Scan(value interface{}) error

Scan impl sql.Scanner interface

func (*Periods) SelfCheck

func (r *Periods) SelfCheck() bool

func (Periods) Value

func (r Periods) Value() (driver.Value, error)

Value impl sql.driver.Valuer interface

Jump to

Keyboard shortcuts

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