Module:BassaridianCalendar: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(37 intermediate revisions by the same user not shown)
Line 2: Line 2:


function p.getCurrentDate()
function p.getCurrentDate()
    -- Get the current date
     local startDate = os.time({year = 1999, month = 8, day = 6})
     local yearDay = tonumber(os.date("%j")) -- Day of the year (1-365/366)
     local secondsInDay = 86400
     local currentYear = 50 -- Current PSSC year
     local daysPerYear = 183
    local isLeapYear = (tonumber(os.date("%Y")) % 4 == 0 and (tonumber(os.date("%Y")) % 100 ~= 0 or tonumber(os.date("%Y")) % 400 == 0))
     local totalDays = isLeapYear and 366 or 365 -- Total days in the Gregorian year


    -- Bassaridian calendar constants
     local currentDate = os.time()
     local yearStart = 237 -- August 25th is Day 237 in Gregorian year
     local totalDaysElapsed = math.floor((currentDate - startDate) / secondsInDay)
     local calendarDays = 183 -- Total days in Bassaridian year
    local monthLength = 61 -- Each Bassaridian month has 61 days


     -- Adjust for Bassaridian calendar
     local yearFraction = totalDaysElapsed / daysPerYear
     local adjustedDay = yearDay - yearStart
    local psscYear = math.floor(yearFraction)
     if adjustedDay < 0 then
    local dayOfYear = math.floor((yearFraction - psscYear) * daysPerYear) + 1
         adjustedDay = adjustedDay + totalDays -- Adjust for wraparound to previous year
 
         currentYear = currentYear - 1
    -- DEBUG/LOG: if you'd like to see the dayOfYear for troubleshooting
     -- mw.log("DEBUG: dayOfYear = " .. tostring(dayOfYear))
 
    ----------------------------------------------------------------------------
    -- 1) SAFETY CHECK: Ensure dayOfYear is between 1 and 183 (inclusive)
    ----------------------------------------------------------------------------
     if dayOfYear < 1 then
         -- Option A: Wrap around by adding daysPerYear until we're back in range
        dayOfYear = dayOfYear + daysPerYear
        while dayOfYear < 1 do
            dayOfYear = dayOfYear + daysPerYear
        end
 
        -- Option B (alternative) could be a modulo approach:
        -- dayOfYear = ((dayOfYear - 1) % daysPerYear) + 1
    elseif dayOfYear > daysPerYear then
        -- If for some reason it exceeds 183, wrap around or clamp
         dayOfYear = ((dayOfYear - 1) % daysPerYear) + 1
     end
     end
    local bassaridianDay = (adjustedDay % calendarDays) + 1


     -- Determine month and day within the month
     ----------------------------------------------------------------------------
     local bassaridianMonth, bassaridianMonthDay
    -- 2) ZODIAC PROVERBS
    if bassaridianDay <= 61 then
    ----------------------------------------------------------------------------
         bassaridianMonth = "Atosiel"
     local zodiacProverbs = {
         bassaridianMonthDay = bassaridianDay
        Atosien  = "The first light reveals the sacred cycle of renewal.",
    elseif bassaridianDay <= 121 then
        Eosena    = "The dawn whispers: every step is a rebirth.",
         bassaridianMonth = "Thalassiel"
        Micrasha  = "Wisdom is the balance of shadow and flame.",
         bassaridianMonthDay = bassaridianDay - 61
         Pyreska  = "Creation ignites in the fires of transformation.",
     else
         Indomin  = "Two paths intertwine: strength in unity, clarity in duality.",
         bassaridianMonth = "Opsitheiel"
        Chrysen  = "Gold is the soul's test: will you hoard or share?",
         bassaridianMonthDay = bassaridianDay - 121
         Thalassian= "The tides of Thalassiel teach patience and purpose.",
    end
        Nephelia  = "Dreams are stars, fleeting yet eternal in the night sky.",
        Glinaeus  = "The frost preserves what must endure.",
        Noctien  = "Night guides those who seek the unseen truths.",
         Opsithia  = "The harvest feeds not just the body, but the spirit.",
        Stygian  = "Through the Styx flows the essence of transformation.",
        Faunian  = "The forests sing of life and the balance it brings.",
        Silenian  = "Celebration is the nectar of divine abundance.",
        Catosien  = "Order shapes greatness; the straight path ascends."
    }
 
    ----------------------------------------------------------------------------
    -- 3) DETERMINE MONTH, DAY-IN-MONTH, AND ZODIAC
    ----------------------------------------------------------------------------
    local month, dayInMonth, zodiac
 
    -- Day ranges: 1..61 => Atosiel, 62..122 => Thalassiel, 123..183 => Opsitheiel
     if dayOfYear <= 61 then
         month = "Atosiel"
         dayInMonth = dayOfYear


    -- Determine Zodiac sign
        -- ZODIAC
    local zodiacSign
         if dayInMonth <= 12 then
    if bassaridianMonth == "Atosiel" then
             zodiac = "Atosien"
         if bassaridianMonthDay <= 12 then
         elseif dayInMonth <= 24 then
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Atosien]"
             zodiac = "Eosena"
         elseif bassaridianMonthDay <= 24 then
         elseif dayInMonth <= 36 then
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Eosena]"
             zodiac = "Micrasha"
         elseif bassaridianMonthDay <= 36 then
         elseif dayInMonth <= 48 then
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Micrasha]"
             zodiac = "Pyreska"
         elseif bassaridianMonthDay <= 48 then
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Pyreska]"
         else
         else
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Indomin]"
             zodiac = "Indomin"
         end
         end
     elseif bassaridianMonth == "Thalassiel" then
 
         if bassaridianMonthDay <= 12 then
     elseif dayOfYear <= 122 then
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Chrysen]"
        month = "Thalassiel"
         elseif bassaridianMonthDay <= 24 then
        dayInMonth = dayOfYear - 61
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Thalassian]"
 
         elseif bassaridianMonthDay <= 48 then
        -- ZODIAC
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Nephelia]"
         if dayInMonth <= 12 then
             zodiac = "Chrysen"
         elseif dayInMonth <= 24 then
             zodiac = "Thalassian"
         elseif dayInMonth <= 36 then
            zodiac = "Nephelia"
        elseif dayInMonth <= 48 then
             zodiac = "Glinaeus"
         else
         else
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Glinaeus]"
             zodiac = "Noctien"
         end
         end
     elseif bassaridianMonth == "Opsitheiel" then
 
         if bassaridianMonthDay <= 12 then
     else
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Opsithia]"
        month = "Opsitheiel"
         elseif bassaridianMonthDay <= 24 then
        dayInMonth = dayOfYear - 122
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Stygian]"
 
         elseif bassaridianMonthDay <= 36 then
        -- ZODIAC
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Faunian]"
         if dayInMonth <= 12 then
         elseif bassaridianMonthDay <= 48 then
             zodiac = "Opsithia"
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Silenian]"
         elseif dayInMonth <= 24 then
             zodiac = "Stygian"
         elseif dayInMonth <= 36 then
             zodiac = "Faunian"
         elseif dayInMonth <= 48 then
             zodiac = "Silenian"
         else
         else
             zodiacSign = "[https://micras.org/mwiki/Reformed_Stripping_Path#Overview_of_the_Bassaridian_Zodiac Catosien]"
             zodiac = "Catosien"
         end
         end
     end
     end


     -- Event lookup table with links
     ----------------------------------------------------------------------------
    -- 4) SAFETY NET: If somehow dayInMonth is still nil, handle gracefully
    ----------------------------------------------------------------------------
    if not dayInMonth then
        -- Provide a fallback, e.g., default to day 1 in Atosiel
        dayInMonth = 1
        month = "Atosiel"
        zodiac = "Atosien"
    end
 
    ----------------------------------------------------------------------------
    -- 5) DEFINE EVENTS WITH CORRECTED DAY ALIGNMENT AND SHORT DESCRIPTIONS
    ----------------------------------------------------------------------------
     local events = {
     local events = {
         ["Atosiel,6"] = "Bayram al-Nur (Festival of Light) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Vaeringheim Vaeringheim]",
         ["Atosiel,6"] = "Bayram al-Nur (Festival of Light) [Vaeringheim] – Celebrates Atos’s dominion over creation.",
         ["Atosiel,18"] = "Chag Or Hadash (Festival of New Light) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Luminaria Luminaria]",
         ["Atosiel,18"] = "Chag Or Hadash (Festival of New Light) [Luminaria] – Honoring the Lady Divine Eos.",
         ["Atosiel,30"] = "Symposion Eirinis (Symposium of Harmony) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Serena Serena]",
         ["Atosiel,30"] = "Symposion Eirinis (Symposium of Harmony) [Serena] – Wisdom gatherings for Micrasha.",
         ["Atosiel,43"] = "Alev Günü (Day of Flame) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Pyralis Pyralis]",
         ["Atosiel,43"] = "Alev Günü (Day of Flame) [Pyralis] – Ignis Aeternum rites for Pyros.",
         ["Atosiel,55"] = "Tikkun Tzel (Repair of Shadows) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Symphonara Symphonara]",
        ["Atosiel,48"] = "Day of Abandonment [Vaeringheim] – Reflects on exile by Old Gods.",
         ["Thalassiel,67"] = "Panegyris Chrysou (Golden Gathering) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Aurelia Aurelia]",
         ["Atosiel,55"] = "Tikkun Tzel (Repair of Shadows) [Symphonara] – Healing strife for Indigo and Momiji.",
         ["Thalassiel,80"] = "Mehtap Dalgası (Moonlit Tide) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Vaeringheim Vaeringheim]",
         ["Thalassiel,6"] = "Panegyris Chrysou (Golden Gathering) [Aurelia] – Trade fair for Chrysos.",
         ["Thalassiel,92"] = "Oneiro Foteino (Dream of Illumination) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Somniumpolis Somniumpolis]",
        ["Thalassiel,17"] = "Constitution Day [Luminaria] – Remembers civic charters under Tarsica.",
         ["Thalassiel,105"] = "Erev Galgal (Eve of Cycles) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Nexa Nexa]",
         ["Thalassiel,19"] = "Mehtap Dalgası (Moonlit Tide) [Vaeringheim] – Lunar rites of Thalassa.",
         ["Thalassiel,115"] = "Leilat al-Kamar (Night of the Moon) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Lunalis_Sancta Lunalis Sancta]",
         ["Thalassiel,31"] = "Oneiro Foteino (Dream of Illumination) [Somniumpolis] – Nephele’s dream festival.",
         ["Opsitheiel,128"] = "Chag Tvuah (Festival of Harvest) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Sylvapolis Sylvapolis]",
        ["Thalassiel,39"] = "Anniversary of victory in the New South Jangsong Campaign [Nexa]",
         ["Opsitheiel,140"] = "Anagenesis Eirmos (Procession of Rebirth) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Acheron Acheron]",
         ["Thalassiel,44"] = "Erev Galgal (Eve of Cycles) [Nexa] – Glinos cycle rites.",
         ["Opsitheiel,150"] = "Panagia Therizis (Holy Day of the Reaper) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Sylvapolis Sylvapolis]",
        ["Thalassiel,45"] = "Bassaridia Festival [Somniumpolis] – Celebrating Alperkin roots.",
         ["Opsitheiel,165"] = "Karnavali Thysias (Carnival of Celebration) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Erythros Erythros]",
        ["Thalassiel,48"] = "Anniversary of victory in the Southern Lake Morovia Campaign [Somniumpolis]",
         ["Opsitheiel,175"] = "Sefar Yashar (Straight Path Celebration) in [https://micras.org/mwiki/List_of_cities_in_Bassaridia_Vaeringheim#Catonis_Atrium Catonis Atrium]",
         ["Thalassiel,54"] = "Leilat al-Kamar (Night of the Moon) [Lunalis Sancta] – Noctis vigil.",
        ["Thalassiel,61"] = "Taşrakah (Reverence of the Stone) [Luminaria] – Honors Eos & Tarsica.",
         ["Opsitheiel,6"] = "Chag Tvuah (Festival of Harvest) [Sylvapolis] – Celebrating Opsithe.",
         ["Opsitheiel,18"] = "Anagenesis Eirmos (Procession of Rebirth) [Acheron] – Styx transformations.",
         ["Opsitheiel,28"] = "Panagia Therizis (Holy Day of the Reaper) [Sylvapolis] – Double-festival for Faun/Opsithe.",
        ["Opsitheiel,37"] = "Anniversary of victory in the Morovian Frontier Campaign [Acheron]",
         ["Opsitheiel,43"] = "Karnavali Thysias (Carnival of Celebration) [Erythros] – Silenus merriment.",
         ["Opsitheiel,53"] = "Sefar Yashar (Straight Path Celebration) [Catonis Atrium] – Devotions to Cato."
     }
     }


     -- Find the event for the current date
     ----------------------------------------------------------------------------
     local eventKey = bassaridianMonth .. "," .. bassaridianMonthDay
    -- 6) EVENT LOOKUP
    ----------------------------------------------------------------------------
     local eventKey = month .. "," .. dayInMonth
     local event = events[eventKey] or "No significant events today."
     local event = events[eventKey] or "No significant events today."


     -- Return the full date, zodiac sign, and event
     ----------------------------------------------------------------------------
     return bassaridianMonthDay .. ", " .. bassaridianMonth .. " " .. zodiacSign .. ", " .. currentYear .. " PSSC – " .. event
    -- 7) LOOK UP PROVERB
    ----------------------------------------------------------------------------
    local dailyProverb = zodiacProverbs[zodiac] or "No proverb found."
 
    ----------------------------------------------------------------------------
    -- 8) RETURN THE RESULT
    ----------------------------------------------------------------------------
     return dayOfYear .. ", " .. month .. " (" .. zodiac .. "), " .. psscYear
          .. " PSSC – " .. event .. " – Proverb: " .. dailyProverb
end
end


return p
return p

Latest revision as of 06:53, 30 December 2024

Documentation for this module may be created at Module:BassaridianCalendar/doc

local p = {}

function p.getCurrentDate()
    local startDate = os.time({year = 1999, month = 8, day = 6})
    local secondsInDay = 86400
    local daysPerYear = 183

    local currentDate = os.time()
    local totalDaysElapsed = math.floor((currentDate - startDate) / secondsInDay)

    local yearFraction = totalDaysElapsed / daysPerYear
    local psscYear = math.floor(yearFraction)
    local dayOfYear = math.floor((yearFraction - psscYear) * daysPerYear) + 1

    -- DEBUG/LOG: if you'd like to see the dayOfYear for troubleshooting
    -- mw.log("DEBUG: dayOfYear = " .. tostring(dayOfYear))

    ----------------------------------------------------------------------------
    -- 1) SAFETY CHECK: Ensure dayOfYear is between 1 and 183 (inclusive)
    ----------------------------------------------------------------------------
    if dayOfYear < 1 then
        -- Option A: Wrap around by adding daysPerYear until we're back in range
        dayOfYear = dayOfYear + daysPerYear
        while dayOfYear < 1 do
            dayOfYear = dayOfYear + daysPerYear
        end

        -- Option B (alternative) could be a modulo approach:
        -- dayOfYear = ((dayOfYear - 1) % daysPerYear) + 1
    elseif dayOfYear > daysPerYear then
        -- If for some reason it exceeds 183, wrap around or clamp
        dayOfYear = ((dayOfYear - 1) % daysPerYear) + 1
    end

    ----------------------------------------------------------------------------
    -- 2) ZODIAC PROVERBS
    ----------------------------------------------------------------------------
    local zodiacProverbs = {
        Atosien   = "The first light reveals the sacred cycle of renewal.",
        Eosena    = "The dawn whispers: every step is a rebirth.",
        Micrasha  = "Wisdom is the balance of shadow and flame.",
        Pyreska   = "Creation ignites in the fires of transformation.",
        Indomin   = "Two paths intertwine: strength in unity, clarity in duality.",
        Chrysen   = "Gold is the soul's test: will you hoard or share?",
        Thalassian= "The tides of Thalassiel teach patience and purpose.",
        Nephelia  = "Dreams are stars, fleeting yet eternal in the night sky.",
        Glinaeus  = "The frost preserves what must endure.",
        Noctien   = "Night guides those who seek the unseen truths.",
        Opsithia  = "The harvest feeds not just the body, but the spirit.",
        Stygian   = "Through the Styx flows the essence of transformation.",
        Faunian   = "The forests sing of life and the balance it brings.",
        Silenian  = "Celebration is the nectar of divine abundance.",
        Catosien  = "Order shapes greatness; the straight path ascends."
    }

    ----------------------------------------------------------------------------
    -- 3) DETERMINE MONTH, DAY-IN-MONTH, AND ZODIAC
    ----------------------------------------------------------------------------
    local month, dayInMonth, zodiac

    -- Day ranges: 1..61 => Atosiel, 62..122 => Thalassiel, 123..183 => Opsitheiel
    if dayOfYear <= 61 then
        month = "Atosiel"
        dayInMonth = dayOfYear

        -- ZODIAC
        if dayInMonth <= 12 then
            zodiac = "Atosien"
        elseif dayInMonth <= 24 then
            zodiac = "Eosena"
        elseif dayInMonth <= 36 then
            zodiac = "Micrasha"
        elseif dayInMonth <= 48 then
            zodiac = "Pyreska"
        else
            zodiac = "Indomin"
        end

    elseif dayOfYear <= 122 then
        month = "Thalassiel"
        dayInMonth = dayOfYear - 61

        -- ZODIAC
        if dayInMonth <= 12 then
            zodiac = "Chrysen"
        elseif dayInMonth <= 24 then
            zodiac = "Thalassian"
        elseif dayInMonth <= 36 then
            zodiac = "Nephelia"
        elseif dayInMonth <= 48 then
            zodiac = "Glinaeus"
        else
            zodiac = "Noctien"
        end

    else
        month = "Opsitheiel"
        dayInMonth = dayOfYear - 122

        -- ZODIAC
        if dayInMonth <= 12 then
            zodiac = "Opsithia"
        elseif dayInMonth <= 24 then
            zodiac = "Stygian"
        elseif dayInMonth <= 36 then
            zodiac = "Faunian"
        elseif dayInMonth <= 48 then
            zodiac = "Silenian"
        else
            zodiac = "Catosien"
        end
    end

    ----------------------------------------------------------------------------
    -- 4) SAFETY NET: If somehow dayInMonth is still nil, handle gracefully
    ----------------------------------------------------------------------------
    if not dayInMonth then
        -- Provide a fallback, e.g., default to day 1 in Atosiel
        dayInMonth = 1
        month = "Atosiel"
        zodiac = "Atosien"
    end

    ----------------------------------------------------------------------------
    -- 5) DEFINE EVENTS WITH CORRECTED DAY ALIGNMENT AND SHORT DESCRIPTIONS
    ----------------------------------------------------------------------------
    local events = {
        ["Atosiel,6"] = "Bayram al-Nur (Festival of Light) [Vaeringheim] – Celebrates Atos’s dominion over creation.",
        ["Atosiel,18"] = "Chag Or Hadash (Festival of New Light) [Luminaria] – Honoring the Lady Divine Eos.",
        ["Atosiel,30"] = "Symposion Eirinis (Symposium of Harmony) [Serena] – Wisdom gatherings for Micrasha.",
        ["Atosiel,43"] = "Alev Günü (Day of Flame) [Pyralis] – Ignis Aeternum rites for Pyros.",
        ["Atosiel,48"] = "Day of Abandonment [Vaeringheim] – Reflects on exile by Old Gods.",
        ["Atosiel,55"] = "Tikkun Tzel (Repair of Shadows) [Symphonara] – Healing strife for Indigo and Momiji.",
        ["Thalassiel,6"]  = "Panegyris Chrysou (Golden Gathering) [Aurelia] – Trade fair for Chrysos.",
        ["Thalassiel,17"] = "Constitution Day [Luminaria] – Remembers civic charters under Tarsica.",
        ["Thalassiel,19"] = "Mehtap Dalgası (Moonlit Tide) [Vaeringheim] – Lunar rites of Thalassa.",
        ["Thalassiel,31"] = "Oneiro Foteino (Dream of Illumination) [Somniumpolis] – Nephele’s dream festival.",
        ["Thalassiel,39"] = "Anniversary of victory in the New South Jangsong Campaign [Nexa]",
        ["Thalassiel,44"] = "Erev Galgal (Eve of Cycles) [Nexa] – Glinos cycle rites.",
        ["Thalassiel,45"] = "Bassaridia Festival [Somniumpolis] – Celebrating Alperkin roots.",
        ["Thalassiel,48"] = "Anniversary of victory in the Southern Lake Morovia Campaign [Somniumpolis]",
        ["Thalassiel,54"] = "Leilat al-Kamar (Night of the Moon) [Lunalis Sancta] – Noctis vigil.",
        ["Thalassiel,61"] = "Taşrakah (Reverence of the Stone) [Luminaria] – Honors Eos & Tarsica.",
        ["Opsitheiel,6"]  = "Chag Tvuah (Festival of Harvest) [Sylvapolis] – Celebrating Opsithe.",
        ["Opsitheiel,18"] = "Anagenesis Eirmos (Procession of Rebirth) [Acheron] – Styx transformations.",
        ["Opsitheiel,28"] = "Panagia Therizis (Holy Day of the Reaper) [Sylvapolis] – Double-festival for Faun/Opsithe.",
        ["Opsitheiel,37"] = "Anniversary of victory in the Morovian Frontier Campaign [Acheron]",
        ["Opsitheiel,43"] = "Karnavali Thysias (Carnival of Celebration) [Erythros] – Silenus merriment.",
        ["Opsitheiel,53"] = "Sefar Yashar (Straight Path Celebration) [Catonis Atrium] – Devotions to Cato."
    }

    ----------------------------------------------------------------------------
    -- 6) EVENT LOOKUP
    ----------------------------------------------------------------------------
    local eventKey = month .. "," .. dayInMonth
    local event = events[eventKey] or "No significant events today."

    ----------------------------------------------------------------------------
    -- 7) LOOK UP PROVERB
    ----------------------------------------------------------------------------
    local dailyProverb = zodiacProverbs[zodiac] or "No proverb found."

    ----------------------------------------------------------------------------
    -- 8) RETURN THE RESULT
    ----------------------------------------------------------------------------
    return dayOfYear .. ", " .. month .. " (" .. zodiac .. "), " .. psscYear
           .. " PSSC – " .. event .. " – Proverb: " .. dailyProverb
end

return p