Giter Club home page Giter Club logo

luacalendar's People

Contributors

smurfier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jasond94

luacalendar's Issues

Support for ICS ?

Will there be plans to support iCalendar files (ICS) or at least something to convert them to XML that is usable with your LuaCalendar?

btw, your skin is awesome. :D

(this is not issue but suggestion for improvement)

Holidays may have different dates each year.

In my country, holidays depend not only on the solar calendar but also on the lunar calendar. For example, January 1st on the solar calendar is called New Year’s Day and is the same every year. However, the Dragon Boat Festival falls on June 22nd in 2023 but on June 3rd in 2022!

Add Leading Zero in Events List

A forum member asked about displaying a leading zero in the events list, when this option is set in the calendar.

This can be accomplished by changing the Function Events() -- Parse Events table
line 250 (local tbl) to:

function Events() -- Parse Events table.
    Hol = setmetatable({}, { __call = function(self) -- Returns a list of events
        local Evns = {}

        for day = Time.stats.inmonth and Time.curr.day or 1, Time.stats.clength do -- Parse through month days to keep days in order
            if self[day] then
                local tbl = setmetatable({day = LZero(day), desc = table.concat(self[day]['text'], ', ')},
                    { __index = function(_, input) return ErrMsg('', 'Invalid NextFormat variable {$%s}', input) end,})
                table.insert(Evns, (Settings.NextFormat:gsub('{%$([^}]+)}', function(variable) return tbl[variable:lower()] end)) )
            end
        end

        return table.concat(Evns, '\n')
    end})

Added the LZero() function to the 'day' value.

The events list will display a leading zero just like the calendar, if 'Leading Zeros' is selected in the options.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.