Documentation
¶
Index ¶
- Constants
- Variables
- func ComputeGregorianPascha(year int) (time.Time, error)
- func ComputeJulianPascha(year int) (int, int)
- func ComputeJulianPaschaDistance(year, month, day int) (int, int)
- func ComputePaschaDistance(year, month, day int) (int, int)
- func ComputePaschaJDN(year int) int
- func GregorianDateToJDN(year, month, day int) int
- func GregorianToJulian(year, month, day int) (time.Time, error)
- func JulianDateToJDN(year, month, day int) int
- func JulianToGregorian(year, month, day int) (time.Time, error)
- func NormalizeBookName(name string) string
- func SurroundingWeekends(distance int) (int, int, int, int)
- func WeekDayFromPDist(distance int) int
- type Bible
- type Day
- type DayFactory
- type Passage
- type Reading
- type Verse
- type Year
Constants ¶
const ( Sunday = iota Monday Tuesday Wednesday Thursday Friday Saturday )
const ( NoFast = iota Fast LentenFast ApostlesFast DormitionFast NativityFast )
Variables ¶
var BookNames = map[string]string{}/* 150 elements not displayed */
var FastExceptions = map[int]string{
1: "Wine and Oil are Allowed",
2: "Fish, Wine and Oil are Allowed",
3: "Wine and Oil are Allowed",
4: "Fish, Wine and Oil are Allowed",
5: "Wine is Allowed",
6: "Wine, Oil and Caviar are Allowed",
7: "Meat Fast",
8: "Strict Fast (Wine and Oil)",
9: "Strict Fast",
10: "No overrides",
11: "Fast Free",
}
var FastLevels = map[int]string{ NoFast: "No Fast", Fast: "Fast", LentenFast: "Lenten Fast", ApostlesFast: "Apostles Fast", DormitionFast: "Dormition Fast", NativityFast: "Nativity Fast", }
var FeastLevels = map[int]string{
-1: "No Liturgy",
0: "Liturgy",
1: "Presanctified",
2: "Black squigg (6-stich typikon symbol)",
3: "Red squigg (doxology typikon symbol)",
4: "Red cross (polyeleos typikon symbol)",
5: "Red cross half-circle (vigil typikon symbol)",
6: "Red cross circle (great feast typikon symbol)",
7: "Major feast Theotokos",
8: "Major feast Lord",
}
Functions ¶
func ComputeGregorianPascha ¶
Compute the Gregorian date of Pascha for the given year. The year must be between 2001 and 2099.
func ComputeJulianPascha ¶
Compute the Julian date of Pascha for the given year.
func ComputeJulianPaschaDistance ¶
Compute the distance of a given day from Pascha. Returns the distance and the year. If the distance is < -77, the returned year will be earlier than the one passed in.
func ComputePaschaDistance ¶
Compute the distance of a given day from Pascha. Returns the distance and the year. If the distance is < -77, the returned year will be earlier than the one passed in.
func ComputePaschaJDN ¶
Compute the Julian day number of Pascha for the given year.
func GregorianDateToJDN ¶
Convert a Gregorian date to a Julian day number. This function mimic's PHP's gregoriantojd().
func GregorianToJulian ¶
Convert a Gregorian date to a Julian date.
func JulianDateToJDN ¶
Convert a Julian date to a Julian day number.
func JulianToGregorian ¶
Convert a Julian date to a Gregorian date.
func NormalizeBookName ¶
func WeekDayFromPDist ¶
Return the day of the week given the distance from Pascha.
Types ¶
type Day ¶
type Day struct { PDist int `json:"pascha_distance"` JDN int `json:"julian_day_number"` Year int `json:"year"` Month int `json:"month"` Day int `json:"day"` Weekday int `json:"weekday"` Tone int `json:"tone"` Titles []string `json:"titles"` FeastLevel int `json:"feast_level"` FeastLevelDesc string `json:"feast_level_description"` Feasts []string `json:"feasts"` FastLevel int `json:"fast_level"` FastLevelDesc string `json:"fast_level_desc"` FastException int `json:"fast_exception"` FastExceptionDesc string `json:"fast_exception_desc"` Saints []string `json:"saints"` ServiceNotes []string `json:"service_notes"` Readings []Reading `json:"readings"` // contains filtered or unexported fields }
func (*Day) HasNoMemorial ¶
type DayFactory ¶
type DayFactory struct {
// contains filtered or unexported fields
}
func NewDayFactory ¶
func NewDayFactory(useJulian bool, doJump bool, db *sql.DB) *DayFactory
func (*DayFactory) LookupComposite ¶
func (self *DayFactory) LookupComposite(num int) (passage Passage)
func (*DayFactory) NewDayWithContext ¶
type Year ¶
type Year struct { Year int Pascha int // Julian Day Number (JDN) PreviousPascha int NextPascha int // These measure the distance from Pascha (PDist) Finding int Annunciation int PeterAndPaul int Beheading int NativityTheotokos int Elevation int FathersSix int FathersSeven int DemetriusSaturday int SynaxisUnmercenaries int Nativity int Forefathers int Theophany int ExtraSundays int // This is the number of days after the Elevation? LucanJump int Reserves []int Paremias []int NoParemias []int // contains filtered or unexported fields }