compensation

package
v1.94.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Period

type Period struct {
	Year  int
	Month time.Month
}

Period represents a monthly payment period.

func PeriodFromString

func PeriodFromString(s string) (Period, error)

PeriodFromString parses the YYYY-MM string into a Period.

func PeriodFromTime

func PeriodFromTime(t time.Time) Period

PeriodFromTime takes a time.Time and returns a Period that contains it.

func (Period) EndDateExclusive

func (p Period) EndDateExclusive() time.Time

EndDateExclusive returns a time.Time that is greater than any time in the period.

func (Period) MarshalCSV

func (p Period) MarshalCSV() (string, error)

MarshalCSV returns the CSV form of the Period.

func (Period) StartDate

func (p Period) StartDate() time.Time

StartDate returns a time.Time that is less than or equal to any time in the period.

func (Period) String

func (p Period) String() string

String outputs the YYYY-MM form of the payment period.

func (*Period) UnmarshalCSV

func (p *Period) UnmarshalCSV(s string) error

UnmarshalCSV reads the Period in CSV form.

Jump to

Keyboard shortcuts

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