Module:BassaridianCalendar: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
NewZimiaGov (talk | contribs)
No edit summary
NewZimiaGov (talk | contribs)
No edit summary
Tag: Manual revert
Line 13: Line 13:
     local dayOfYear = math.floor((yearFraction - psscYear) * daysPerYear) + 1
     local dayOfYear = math.floor((yearFraction - psscYear) * daysPerYear) + 1


     -- Define zodiac proverbs for every single day of the year
     -- Define zodiac proverbs
     local dailyProverbs = {
     local zodiacProverbs = {
         -- Atosiel Zodiacs
         Atosien = "The first light reveals the sacred cycle of renewal.",
        "The first light reveals the sacred cycle of renewal.",
         Eosena = "The dawn whispers: every step is a rebirth.",
         "Every dawn carries the promise of unbroken cycles.",
         Micrasha = "Wisdom is the balance of shadow and flame.",
        "In the stillness of beginnings lies infinite potential.",
         Pyreska = "Creation ignites in the fires of transformation.",
        "The seeds of wisdom grow in the soil of patience.",
         Indomin = "Two paths intertwine: strength in unity, clarity in duality.",
        "Through renewal, the divine breath takes form.",
         Chrysen = "Gold is the soul's test: will you hoard or share?",
        "The light of Atosiel is the key to hidden truths.",
         Thalassian = "The tides of Thalassiel teach patience and purpose.",
        "Courage blooms in the first rays of the sun.",
         Nephelia = "Dreams are stars, fleeting yet eternal in the night sky.",
        "Shadows of the past are illuminated by renewal.",
         Glinaeus = "The frost preserves what must endure.",
        "The cycle begins with trust in the unseen.",
         Noctien = "Night guides those who seek the unseen truths.",
        "Harmony emerges from chaos in every first step.",
         Opsithia = "The harvest feeds not just the body, but the spirit.",
        "To know the path, one must honor its origin.",
         Stygian = "Through the Styx flows the essence of transformation.",
        "The first spark ignites the endless fire of creation.",
         Faunian = "The forests sing of life and the balance it brings.",
 
         Silenian = "Celebration is the nectar of divine abundance.",
        -- Eosena Zodiacs
         Catosien = "Order shapes greatness; the straight path ascends."
        "The dawn whispers: every step is a rebirth.",
         "Each morning carries echoes of divine awakening.",
        "With every sunrise, the soul remembers its purpose.",
        "The golden hour reflects the harmony of creation.",
        "Awaken to the wisdom woven in the light.",
        "Each ray of dawn is a gift of renewal.",
        "The heart of the cosmos beats with each sunrise.",
        "To greet the dawn is to embrace eternity.",
        "The rising sun paints wisdom across the heavens.",
        "Begin anew, for dawn forgives the darkness.",
        "Life renews in the glow of the sacred morning.",
        "At dawn, the path of the divine becomes clear.",
 
        -- Micrasha Zodiacs
        "Wisdom is the balance of shadow and flame.",
         "In the fire’s glow, the truth is tempered.",
        "From the ashes of darkness rises luminous wisdom.",
        "The duality of flame and shadow reveals the divine.",
        "The sacred flame ignites understanding.",
        "Where fire meets shadow, creation flourishes.",
        "To honor fire is to embrace its lessons of change.",
        "The balance of shadow and flame forges strength.",
        "Wisdom flows from the hearth of the cosmos.",
        "Only in balance can the fire truly shine.",
        "The sacred fire consumes all but the eternal truth.",
        "Each spark holds the memory of divine creation.",
 
        -- Pyreska Zodiacs
        "Creation ignites in the fires of transformation.",
         "In the furnace of change, the divine takes shape.",
        "Flames of creation burn brightest in renewal.",
        "To transform is to walk with the sacred fire.",
        "The light of Pyreska forges paths unseen.",
        "Through fire, the cosmos reshapes itself anew.",
        "Transformation is the essence of sacred creation.",
        "Creation arises from the crucible of divine fire.",
        "The cosmos kindles infinite sparks of renewal.",
        "Every flame is a hymn to the divine.",
        "In the dance of flames lies eternal harmony.",
        "To create is to wield the fires of the infinite.",
 
        -- Indomin Zodiacs
        "Two paths intertwine: strength in unity, clarity in duality.",
         "Unity is forged where opposites meet in harmony.",
        "The strength of duality is the wisdom of the cosmos.",
        "In the union of opposites, truth finds its home.",
        "Two roads lead to one enduring light.",
        "Duality reflects the eternal rhythm of the stars.",
        "Balance is the bridge between strength and clarity.",
        "From duality springs the power to transform worlds.",
        "Unity blooms in the harmony of opposing forces.",
        "Strength is the bond of the cosmos.",
        "The divine whispers in the harmony of the dual.",
        "The straightest path is found between two horizons.",
 
        -- Chrysen Zodiacs
        "Gold is the soul's test: will you hoard or share?",
         "The shimmer of gold reflects the heart's true nature.",
         "In the pursuit of gold, wisdom reveals itself.",
         "The weight of gold is matched only by its burden.",
         "True wealth is found in what you give, not take.",
         "The gleam of gold illuminates paths yet untaken.",
        "Greed blinds, but generosity frees the spirit.",
         "Gold is the mirror of the soul's aspirations.",
         "The wise see gold as a tool, not a master.",
         "Every golden thread weaves the fabric of destiny.",
        "Fortune smiles upon those who honor its gifts.",
         "The brightest gold lies hidden in the heart."
 
        -- Continue for other zodiac sections...
     }
     }


Line 133: Line 63:
     local events = {
     local events = {
         ["Atosiel,6"] = "Bayram al-Nur (Festival of Light) [Vaeringheim]",
         ["Atosiel,6"] = "Bayram al-Nur (Festival of Light) [Vaeringheim]",
         ["Thalassiel,61"] = "Taşrakah (Reverence of the Stone) [Luminaria]"
        ["Atosiel,18"] = "Chag Or Hadash (Festival of New Light) [Luminaria]",
        ["Atosiel,30"] = "Symposion Eirinis (Symposium of Harmony) [Serena]",
        ["Atosiel,43"] = "Alev Günü (Day of Flame) [Pyralis]",
        ["Atosiel,48"] = "Day of Abandonment [Vaeringheim]",
        ["Atosiel,55"] = "Tikkun Tzel (Repair of Shadows) [Symphonara]",
        ["Thalassiel,6"] = "Panegyris Chrysou (Golden Gathering) [Aurelia]",
        ["Thalassiel,17"] = "Constitution Day [Luminaria]",
        ["Thalassiel,19"] = "Mehtap Dalgası (Moonlit Tide) [Vaeringheim]",
        ["Thalassiel,31"] = "Oneiro Foteino (Dream of Illumination) [Somniumpolis]",
        ["Thalassiel,39"] = "Anniversary of victory in the New South Jangsong Campaign [Nexa]",
        ["Thalassiel,44"] = "Erev Galgal (Eve of Cycles) [Nexa]",
        ["Thalassiel,45"] = "Bassaridia Festival [Somniumpolis]",
        ["Thalassiel,48"] = "Anniversary of victory in the Southern Lake Morovia Campaign [Somniumpolis]",
        ["Thalassiel,54"] = "Leilat al-Kamar (Night of the Moon) [Lunalis Sancta]",
         ["Thalassiel,61"] = "Taşrakah (Reverence of the Stone) [Luminaria]",
        ["Opsitheiel,6"] = "Chag Tvuah (Festival of Harvest) [Sylvapolis]",
        ["Opsitheiel,18"] = "Anagenesis Eirmos (Procession of Rebirth) [Acheron]",
        ["Opsitheiel,28"] = "Panagia Therizis (Holy Day of the Reaper) [Sylvapolis]",
        ["Opsitheiel,37"] = "Anniversary of victory in the Morovian Frontier Campaign [Acheron]",
        ["Opsitheiel,43"] = "Karnavali Thysias (Carnival of Celebration) [Erythros]",
        ["Opsitheiel,53"] = "Sefar Yashar (Straight Path Celebration) [Catonis Atrium]"
     }
     }


Line 139: Line 89:
     local eventKey = month .. "," .. dayInMonth
     local eventKey = month .. "," .. dayInMonth
     local event = events[eventKey] or "No significant events today."
     local event = events[eventKey] or "No significant events today."
     local dailyProverb = dailyProverbs[dayOfYear]
     local dailyProverb = zodiacProverbs[zodiac]


     -- Return the date, event, and proverb
     -- Return the date, event, and proverb

Revision as of 04:18, 22 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

    -- Define 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."
    }

    -- Month and zodiac logic
    local month, dayInMonth, zodiac
    if dayOfYear <= 61 then
        month = "Atosiel"
        dayInMonth = dayOfYear
        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
        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
        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

    -- Events with corrected day alignment
    local events = {
        ["Atosiel,6"] = "Bayram al-Nur (Festival of Light) [Vaeringheim]",
        ["Atosiel,18"] = "Chag Or Hadash (Festival of New Light) [Luminaria]",
        ["Atosiel,30"] = "Symposion Eirinis (Symposium of Harmony) [Serena]",
        ["Atosiel,43"] = "Alev Günü (Day of Flame) [Pyralis]",
        ["Atosiel,48"] = "Day of Abandonment [Vaeringheim]",
        ["Atosiel,55"] = "Tikkun Tzel (Repair of Shadows) [Symphonara]",
        ["Thalassiel,6"] = "Panegyris Chrysou (Golden Gathering) [Aurelia]",
        ["Thalassiel,17"] = "Constitution Day [Luminaria]",
        ["Thalassiel,19"] = "Mehtap Dalgası (Moonlit Tide) [Vaeringheim]",
        ["Thalassiel,31"] = "Oneiro Foteino (Dream of Illumination) [Somniumpolis]",
        ["Thalassiel,39"] = "Anniversary of victory in the New South Jangsong Campaign [Nexa]",
        ["Thalassiel,44"] = "Erev Galgal (Eve of Cycles) [Nexa]",
        ["Thalassiel,45"] = "Bassaridia Festival [Somniumpolis]",
        ["Thalassiel,48"] = "Anniversary of victory in the Southern Lake Morovia Campaign [Somniumpolis]",
        ["Thalassiel,54"] = "Leilat al-Kamar (Night of the Moon) [Lunalis Sancta]",
        ["Thalassiel,61"] = "Taşrakah (Reverence of the Stone) [Luminaria]",
        ["Opsitheiel,6"] = "Chag Tvuah (Festival of Harvest) [Sylvapolis]",
        ["Opsitheiel,18"] = "Anagenesis Eirmos (Procession of Rebirth) [Acheron]",
        ["Opsitheiel,28"] = "Panagia Therizis (Holy Day of the Reaper) [Sylvapolis]",
        ["Opsitheiel,37"] = "Anniversary of victory in the Morovian Frontier Campaign [Acheron]",
        ["Opsitheiel,43"] = "Karnavali Thysias (Carnival of Celebration) [Erythros]",
        ["Opsitheiel,53"] = "Sefar Yashar (Straight Path Celebration) [Catonis Atrium]"
    }

    -- Check for today's event
    local eventKey = month .. "," .. dayInMonth
    local event = events[eventKey] or "No significant events today."
    local dailyProverb = zodiacProverbs[zodiac]

    -- Return the date, event, and proverb
    return dayOfYear .. ", " .. month .. " (" .. zodiac .. "), " .. psscYear .. " PSSC – " .. event .. " – Proverb: " .. dailyProverb
end

return p