Module:Women in Red event/doc

Usage
This module has various functons that use the list of WikiProject Women in Red events stored at WikiProject Women in Red/events. These are used in and elsewhere.
 * Template:WikiProject Women in Red,
 * Template:WIR meetup header,
 * Template:WIR category
 * Template:Women in Red navigation

main function
Given an event number, reads one of the fields (event, year, month, type, image, series). For example:
 * gives ""
 * gives ""
 * gives ""

name function
Given an event number, returns the name or the series of the event. If the both the name and the series are defined, then it will prepend the series with a colon. For example:
 * gives ""
 * gives ""
 * gives ""

text function
Produces a piped link to the event page followed by the date, for use in the project banner. For example:
 * gives ""

date function
Produces a formatted date (including month and year) of the event. For example:
 * gives ""

This function takes two optional parameters:
 * sentence - if set to "yes" then the date will be expressed as a sentence using the words "from" and "to", e.g. ""
 * abbrev - if set to "yes" then the names of the months will be abbreviated, e.g. ""

findLatest function
Shows the latest event number to be defined (currently ), ignoring the quasi event numbers "2017" and "2018". For example
 * gives ""

An optional parameter add can be used to add or subtract numbers to the latest. For example
 * gives ""

list function
Produce a table of events, for various purposes. The following parameters are recognised. For example  produces
 * first, last - specify the first and/or last event to show in the list.

For example,  produces
 * latest - to show a specified number of the latest events. In this case first and last will be ignored.

Columns
The columns of the table can be customised by setting various parameters to  or.
 * meetup - shows or hides a column with the meetup number. By default this column is shown. If a background colour is defined then it will be used in this cell.
 * logo - enables a column to show the logo associated with each event.
 * series - enables a column to show the series (if applicable) of each event.
 * name - enables a column to show the name of each event, and a link to the meetup page. This will be shown by default.
 * date - shows or hides a column which displays the date of each event. Shown by default.
 * template - column to show the syntax for the template using the shortcut WIR
 * wrapper (deprecated) - column to show the wrapper template for each event. These are no longer in general use.
 * category - enables a column which links to the category for articles created by each event, along with the population of that category.

Examples
The table currently shown on Wikipedia talk:WikiProject Women in Red/events is produced by the syntax.

The table currently shown on Template:WikiProject Women in Red/doc is produced by the syntax  which produces the following:

event_list_by_year function
Produces a list of all past events in a particular year, for use in Template:Women in Red navigation.

For example,  produces:

current_events function
Produces a list of current, upcoming, recently completed and ongoing events, for navigational purposes at the top of meetup pages. The display on a certain month and year can be specified by using the parameters:
 * - specify the 4-digit year, e.g. 2022
 * - specify the month as a number between 1-12. If the year is specified then this will default to 1, i.e. January.

The labels in front of the boxes can be customised with the following parameters:

Examples

 * produces:


 * produces:

events function
Produces a list of current, upcoming and recently completed events, for use on WikiProject Women in Red/Events. It has a number of optional parameters:
 * - include a section for edit-a-thons in the current month. This parameter defines the heading, e.g. Happening now
 * - include a section for ongoing initiatives or contests. This parameter defines the heading, e.g. Ongoing initiatives
 * - include a section for upcoming events. This parameter defines the heading, e.g. Coming up
 * - include a section for recently completed events (i.e. events in the previous month). This parameter defines the heading, e.g. Recently completed
 * - include a section for all past events (except recently completed). This parameter defines the heading, e.g. Past events

category_header function
Used by Template:WIR category to produce a header for various categories. Please see that template's documentation.

addDateCategories function
Used by Template:WIR meetup header to add appropriate categories to meetup pages. This function takes the event number as the first positional parameter.
 * For all events, an annual category such as Category:WikiProject Women in Red in 2024 is added.
 * If the event spans no more than one calendar month, then a monthly category such as Category:Wikipedia meetups in July 2024 is added.
 * If the event spans more than one calendar month, then an annual category such as Category:Wikipedia meetups in 2024 is added.

Example
produces the categories Category:WikiProject Women in Red in 2024 and Category:Wikipedia meetups in March 2024.

pinterest function
Generates a link to Pinterest collection based on the date of the event.

The link is of the form  where   and   are replaced with the relevant month and year. For annual events, the month of January is used.

Example

 * produces