Template:Birth date/sandbox
This is the template sandbox page for Template:Birth date (diff). |
This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
Usage[edit source]
This template generates a formatted date of birth with age and astrological sign. It links the day and month to a category page for people born on that date, and the year to a category page for people born in that year.
To use the template, copy the following code and replace the parameters with the appropriate values:
{{Birth date and age|year|month|day}}
or
{{Birth date and age|year|month|day|df=y}}
- day: The day of birth (e.g., 4)
- month: The month of birth (e.g., 2)
- year: The year of birth (e.g., 1984)
- df: (optional) Set to "y" to display the date in the day-first format (e.g., 4 February 1984). If not provided or set to another value, the date will be displayed in the default month-first format (e.g., February 4, 1984).
Examples[edit source]
{{Birth date and age|1984|2|4}} produces:
4 February 1984 (age 40)
Astrology:
{{Birth date and age|1984|2|4|df=y}} produces:
4 February 1984 (age 40)
Astrology:
Technical details[edit source]
This template uses the Lua programming language and requires the "Module:Birth date and age" module to function. It calculates the age based on the current date and the provided date of birth, and it determines the astrological sign based on the birth month and day. The template also generates the appropriate links to category pages for the day and month, and the year of birth.
See also[edit source]
- {{Birth date}}
- {{Birth year and age}}
- {{Death date and age}}
- {{Age}}