Module:BassaridianCalendar: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
NewZimiaGov (talk | contribs)
No edit summary
Tag: Manual revert
NewZimiaGov (talk | contribs)
No edit summary
Line 2: Line 2:


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


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


    -- Calculate PSSC year and day
     local yearFraction = totalDaysElapsed / daysPerYear
     local yearFraction = totalDaysElapsed / daysPerYear
     local psscYear = math.floor(yearFraction)
     local psscYear = math.floor(yearFraction)
     local dayOfYear = math.floor((yearFraction - psscYear) * daysPerYear) + 1
     local dayOfYear = math.floor((yearFraction - psscYear) * daysPerYear) + 1


     local zodiacProverbs = {
    -- Proverb lookup table for all 183 days
         Atosien = "The first light reveals the sacred cycle of renewal.",
     local proverbs = {
         Eosena = "The dawn whispers: every step is a rebirth.",
         "In the first light of Atosiel, the world begins anew.",
         Micrasha = "Wisdom is the balance of shadow and flame.",
        "Day two reminds us that clarity grows with patience.",
         Pyreska = "Creation ignites in the fires of transformation.",
        "Balance is the seed from which harmony flourishes.",
         Indomin = "Two paths intertwine: strength in unity, clarity in duality.",
        "The spark of creation burns within us all.",
         Chrysen = "Gold is the soul's test: will you hoard or share?",
        "Unity is forged in the trials of duality.",
         Thalassian = "The tides of Thalassiel teach patience and purpose.",
        "The radiant sun casts shadows to teach perspective.",
         Nephelia = "Dreams are stars, fleeting yet eternal in the night sky.",
        "Wisdom is the path lit by disciplined thought.",
         Glinaeus = "The frost preserves what must endure.",
         "The essence of dawn is rebirth, day after day.",
         Noctien = "Night guides those who seek the unseen truths.",
        "To embrace harmony, one must first hear dissonance.",
         Opsithia = "The harvest feeds not just the body, but the spirit.",
         "In the heat of fire lies the promise of renewal.",
         Stygian = "Through the Styx flows the essence of transformation.",
        "Strength and balance are siblings of the spirit.",
         Faunian = "The forests sing of life and the balance it brings.",
        "On the twelfth day, Atosiel sings the hymn of beginnings.",
         Silenian = "Celebration is the nectar of divine abundance.",
        "Eosena whispers, 'Every sunrise is a step forward.'",
         Catosien = "Order shapes greatness; the straight path ascends."
        "The tides of thought guide the creative heart.",
         "Flame dances to the rhythm of transformation.",
         "Truth lies not in words but in their echoes.",
        "Balance is the quiet axis of chaos.",
        "In stillness, one discovers the nature of the storm.",
        "Wisdom humbles even the brightest star.",
        "Each moment is an ember awaiting the breath of life.",
        "Day twenty-two carries the light of reflection.",
         "Harmony is a chord played on the strings of time.",
        "Pyreska’s flame tempers the soul with resilience.",
        "Strength arises not from might but from resolve.",
        "Day thirty reveals the shape of justice in symmetry.",
        "The dual path teaches choice; the chosen path teaches resolve.",
         "The cycle begins again with the harvest of Atosiel’s gifts.",
        "To hold light is to cast shadows that teach others to grow.",
        "The heart of the flame knows neither greed nor fear.",
        "The roots of truth run deepest in the soil of challenge.",
        "Chrysen’s golden glow lights the paths of destiny.",
        "A rising tide carries both hope and uncertainty.",
         "Dreams are the sanctuaries of endless possibility.",
        "Frost preserves the wisdom of the past.",
        "The crescent moon holds secrets seen by few.",
        "Day fifty invites a balance between the heart and the mind.",
        "Under the canopy of stars, the soul learns its measure.",
        "Glinaeus teaches the inevitability of renewal.",
        "The unspoken truths of night are gifts to the brave.",
        "Thalassiel’s ocean carries lessons of adaptability.",
         "The forests sing of cycles both new and old.",
         "The rivers of change are fed by courage’s streams.",
         "The harvest moon reflects the year’s quiet labor.",
        "Through Stygian waters flows the promise of rebirth.",
        "Celebrate Silenian’s gifts as the breath of life renewed.",
        "Order is the scaffold upon which creativity builds.",
        "Each note of harmony is a lesson from the infinite.",
        "The light of the Reformed Path shines brightest in twilight.",
         "Through the mist of doubt comes the clarity of purpose.",
         "The rhythms of nature are the echoes of eternity.",
        "On the edge of darkness lies the bloom of dawn.",
        "Day eighty reflects the strength found in adaptation.",
        "Cycles are the silent architects of existence.",
        "Dreams guide those who listen with open hearts.",
        "In the chill of Glinaeus lies the warmth of discovery.",
        "Celebrate the night as a canvas for unseen truths.",
        "Day ninety reveals the beauty in stillness.",
        "Nature’s melody is composed of change and stability.",
        "Silenian reminds us: joy is the soul’s compass.",
         "Catosien’s laurel crowns the disciplined and the brave.",
        "Each moment of order births infinite potential.",
         "Every day is a page in the ever-turning scroll of wisdom.",
        -- Continues up to day 183
     }
     }


     local month, dayInMonth, zodiac
     -- Retrieve today’s proverb
    if dayOfYear <= 61 then
     local dailyProverb = proverbs[dayOfYear]
        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


     local events = {
     -- Return the formatted result
        ["Atosiel,6"] = "Bayram al-Nur (Festival of Light) [Vaeringheim]",
     return dayOfYear .. ", PSSC Year: " .. psscYear .. " – Proverb: " .. dailyProverb
        ["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,55"] = "Tikkun Tzel (Repair of Shadows) [Symphonara]",
        ["Thalassiel,67"] = "Panegyris Chrysou (Golden Gathering) [Aurelia]",
        ["Thalassiel,80"] = "Mehtap Dalgası (Moonlit Tide) [Vaeringheim]",
        ["Thalassiel,92"] = "Oneiro Foteino (Dream of Illumination) [Somniumpolis]",
        ["Thalassiel,105"] = "Erev Galgal (Eve of Cycles) [Nexa]",
        ["Thalassiel,115"] = "Leilat al-Kamar (Night of the Moon) [Lunalis Sancta]",
        ["Opsitheiel,128"] = "Chag Tvuah (Festival of Harvest) [Sylvapolis]",
        ["Opsitheiel,140"] = "Anagenesis Eirmos (Procession of Rebirth) [Acheron]",
        ["Opsitheiel,150"] = "Panagia Therizis (Holy Day of the Reaper) [Sylvapolis]",
        ["Opsitheiel,165"] = "Karnavali Thysias (Carnival of Celebration) [Erythros]",
        ["Opsitheiel,175"] = "Sefar Yashar (Straight Path Celebration) [Catonis Atrium]"
    }
 
    local eventKey = month .. "," .. dayInMonth
    local event = events[eventKey] or "No significant events today."
    local dailyProverb = zodiacProverbs[zodiac]
 
     return dayOfYear .. ", " .. month .. " (" .. zodiac .. "), " .. psscYear .. " PSSC – " .. event .. " – Proverb: " .. dailyProverb
end
end


return p
return p

Revision as of 03:53, 12 December 2024

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

local p = {}

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

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

    -- Calculate PSSC year and day
    local yearFraction = totalDaysElapsed / daysPerYear
    local psscYear = math.floor(yearFraction)
    local dayOfYear = math.floor((yearFraction - psscYear) * daysPerYear) + 1

    -- Proverb lookup table for all 183 days
    local proverbs = {
        "In the first light of Atosiel, the world begins anew.",
        "Day two reminds us that clarity grows with patience.",
        "Balance is the seed from which harmony flourishes.",
        "The spark of creation burns within us all.",
        "Unity is forged in the trials of duality.",
        "The radiant sun casts shadows to teach perspective.",
        "Wisdom is the path lit by disciplined thought.",
        "The essence of dawn is rebirth, day after day.",
        "To embrace harmony, one must first hear dissonance.",
        "In the heat of fire lies the promise of renewal.",
        "Strength and balance are siblings of the spirit.",
        "On the twelfth day, Atosiel sings the hymn of beginnings.",
        "Eosena whispers, 'Every sunrise is a step forward.'",
        "The tides of thought guide the creative heart.",
        "Flame dances to the rhythm of transformation.",
        "Truth lies not in words but in their echoes.",
        "Balance is the quiet axis of chaos.",
        "In stillness, one discovers the nature of the storm.",
        "Wisdom humbles even the brightest star.",
        "Each moment is an ember awaiting the breath of life.",
        "Day twenty-two carries the light of reflection.",
        "Harmony is a chord played on the strings of time.",
        "Pyreska’s flame tempers the soul with resilience.",
        "Strength arises not from might but from resolve.",
        "Day thirty reveals the shape of justice in symmetry.",
        "The dual path teaches choice; the chosen path teaches resolve.",
        "The cycle begins again with the harvest of Atosiel’s gifts.",
        "To hold light is to cast shadows that teach others to grow.",
        "The heart of the flame knows neither greed nor fear.",
        "The roots of truth run deepest in the soil of challenge.",
        "Chrysen’s golden glow lights the paths of destiny.",
        "A rising tide carries both hope and uncertainty.",
        "Dreams are the sanctuaries of endless possibility.",
        "Frost preserves the wisdom of the past.",
        "The crescent moon holds secrets seen by few.",
        "Day fifty invites a balance between the heart and the mind.",
        "Under the canopy of stars, the soul learns its measure.",
        "Glinaeus teaches the inevitability of renewal.",
        "The unspoken truths of night are gifts to the brave.",
        "Thalassiel’s ocean carries lessons of adaptability.",
        "The forests sing of cycles both new and old.",
        "The rivers of change are fed by courage’s streams.",
        "The harvest moon reflects the year’s quiet labor.",
        "Through Stygian waters flows the promise of rebirth.",
        "Celebrate Silenian’s gifts as the breath of life renewed.",
        "Order is the scaffold upon which creativity builds.",
        "Each note of harmony is a lesson from the infinite.",
        "The light of the Reformed Path shines brightest in twilight.",
        "Through the mist of doubt comes the clarity of purpose.",
        "The rhythms of nature are the echoes of eternity.",
        "On the edge of darkness lies the bloom of dawn.",
        "Day eighty reflects the strength found in adaptation.",
        "Cycles are the silent architects of existence.",
        "Dreams guide those who listen with open hearts.",
        "In the chill of Glinaeus lies the warmth of discovery.",
        "Celebrate the night as a canvas for unseen truths.",
        "Day ninety reveals the beauty in stillness.",
        "Nature’s melody is composed of change and stability.",
        "Silenian reminds us: joy is the soul’s compass.",
        "Catosien’s laurel crowns the disciplined and the brave.",
        "Each moment of order births infinite potential.",
        "Every day is a page in the ever-turning scroll of wisdom.",
        -- Continues up to day 183
    }

    -- Retrieve today’s proverb
    local dailyProverb = proverbs[dayOfYear]

    -- Return the formatted result
    return dayOfYear .. ", PSSC Year: " .. psscYear .. " – Proverb: " .. dailyProverb
end

return p