Documentation
¶
Index ¶
- func GetLastPeriod(periodName string, roundNumber uint64) uint64
- func GetZodiac(year int) string
- func IsNight() bool
- func MonthName(month int) string
- func SetTime(setToHour int, setToMinutes ...int)
- func SetToDay(roundAdjustment ...int)
- func SetToNight(roundAdjustment ...int)
- type GameDate
- type RoundTimer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLastPeriod ¶
func SetToDay ¶
func SetToDay(roundAdjustment ...int)
Jumps the clock forward to the next day If a roundAdjustment is provided, it will be added to the offset This is useful to set to the round right before the rollover
func SetToNight ¶
func SetToNight(roundAdjustment ...int)
Jumps the clock foward to the next night If a roundAdjustment is provided, it will be added to the offset This is useful to set to the round right before the rollover
Types ¶
type GameDate ¶
type GameDate struct {
// The round number this GameDate represents
RoundNumber uint64
RoundsPerDay int
NightHoursPerDay int
Year int
Month int
Week int
Day int
Hour int
Hour24 int
Minute int
MinuteFloat float64
AmPm string
Night bool
DayStart int
NightStart int
}
func (GameDate) AddPeriod ¶
Example: gd := gametime.GetDate() nextPeriodRound := gd.AddPeriod(`10 days`) Accepts: x years, x months, x weeks, x days, x hours, x rounds If `IRL` or `real` are in the mix, such as `x irl days` or `x days irl`, then it will use real world time
func (*GameDate) ReCalculate ¶
func (g *GameDate) ReCalculate()
type RoundTimer ¶
type RoundTimer struct {
RoundStart uint64 `yaml:"roundstart,omitempty"`
Period string `yaml:"period,omitempty"`
// contains filtered or unexported fields
}
func (RoundTimer) Expired ¶
func (r RoundTimer) Expired() bool
Click to show internal directories.
Click to hide internal directories.