Jump to content

Module:Calendar date/events

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by GreenC (talk | contribs) at 21:18, 30 August 2018 (Created page with 'local eventsdata = {} --[[-------------------------< Holiday and Event configuration data > ------------------------------------ name = '' - Name o...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local eventsdata = {}

--[[-------------------------< Holiday and Event configuration data > ------------------------------------

   name = ''          - Name of the holiday or event as given in the template "|holiday=" or "|event=" argument
   description = ''   - Short description of the holiday
   days = ''          - Number of days (string)
   df = ''            - Default date format (mdy,dmy,iso) - can be overridden by "|df=" in the template 
   datatype = ''      - Where the date is obtained, "calculator" or "localfile"
   datasource = ''    - The data calculator; or a link to the local file 
   source = ''        - Describe the source, used in creating citations.

 If datatype = 'localfile' then:

   citeurl = ''       - URL where data was obtained
   accessdate = ''    - Date the data was generated

 In addition some regional types may have their own custom options as detailed below.

      Blank template:
        [''] = {
                name = '',
                description = '',
                days = ''
                df = '',
                source = '',
                datatype = '',
                datasource = ''
        },

  ]]

--[[-------------------------< Hebrew calendar configuration data > ------------------------------------

  Custom options for Hebrew calendar:

    prepend1 = ''     - Prepend text before the first (or only) date eg. "Sunset, <date>"
    prepend2 = ''     - Prepend before the last date eg. "Sunset, <date> - nightfall, <date>"
    startoffset = ''  - Offset the start day by this number (help account for 25hr cycle that starts at Sunset)
    endoutoffset = '' - Offset the end day by this number, when the end day occurs outside of Israel

  ]]

local hebrew_calendar = {
	['Rosh Hashana'] = {
                name = 'Rosh Hashana',
                description = 'The Jewish New Year',                  
                days = '3',
                df = 'dmy',
                prepend1 = 'Sunset',
                prepend2 = 'nightfall',
                source = 'Date calculations by Wikipedia templates {{Calendar date}} and {{Hebrew year/rhdatum}}',
                datatype = 'calculator',
                datasource = '{{#time:Y-m-d|@{{Hebrew year/rhdatum|{{#timel:xjY|YYYY-11-1}}}}-1 days}}'
        },
     }

--- -------------------------< Misc holidays and events configuration data > ------------------------------------

local misc_events = {
        ['Labor Day'] = {
                name = 'Labor Day',
                description = 'Labor Day in the United States',
                days = '1',
                df = 'mdy',
                citeurl = 'https://www.timeanddate.com/holidays/us/labor-day',
                accessdate = '2018-08-27', 
                source = 'Public Domain information from timeanddate.com',
                datatype = 'localfile',
                datasource = 'Template:Calendar date/holidays/Labor Day.js'
        },
    }

return {hebrew_calendar=hebrew_calendar, misc_events=misc_events}