This Perl extension facilitates the creation of uncomplicated calendars.
The function supports different options to retrieve the required month structure. For example, calling it without any arguments will return the current month. Alternatively, one can specify the month and year to retrieve or even set the start day for each week.
The data structure returned is an array of array references. Each element of the first-level array represents a week in the month. The second-level array contains the actual days, with the default value being the date of the day. For days at the beginning of the month, or the end of it, which belong to the previous or next month, the value is undefined.
In addition to the calendar function, there is "date_span" function that returns a reduced version of the month data structure. It begins and ends on dates other than the first and last dates of the month. Weeks that fall outside of the date range are removed from the structure, and any days within the remaining weeks that fall outside of the date range are set to 'undefined'.
Overall, Calendar::Simple is a handy module for any task that requires manipulation of dates and simple calendar creation.
Version 1.20: N/A