Module:Wikidata date/doc
CodeDiscussionEditHistoryLinksLink count Subpages:DocumentationTestsResultsSandboxLive code All modules
This is the documentation page for Module:Wikidata date
Uses Lua: |
This Module handles pulling data type properties from Wikidata. It was mainly intended for calls from other Lua modules, but it can be also called directly from templates. The module can read and parse and display dates in all precision's (year, decade, century, millennium, ettc.) and calendars (Gregorian and Julian) used on Wikidata. It can also interpret all qualifiers used for wider range of dates. Dates are localized (displayed in the language of the user) using:
- Module:ISOdate (also used by {{ISOdate}})
- Module:Complex date (also used by {{Complex date}} and {{Other date}})
Properties
editModule recognizes several qualifiers, by themselves and in groups:
- start time (P580) maps to {{Complex date}}'s from option
- end time (P582) maps to {{Complex date}}'s until option
- start time (P580) and end time (P582) maps to {{Complex date}}'s from-until option
- earliest date (P1319) maps to {{Complex date}}'s after option
- latest date (P1326) maps to {{Complex date}}'s before option
- earliest date (P1319) and latest date (P1326) maps to {{Complex date}}'s between option
- sourcing circumstances (P1480) with following items: circa (Q5727902), probably (Q56644435), presumably (Q18122778), possibly (Q30230067) maps to {{Complex date}}'s certainty parameter with corresponding value (introduced in September 2018; circa was possible as an adjective already before)
- refine date (P4241) with following items: beginning of (Q40719727), middle of (Q40719748), end of (Q40719766), first quarter (Q40690303), second quarter (Q40719649), third quarter (Q40719662), fourth quarter (Q40719674), spring (northern hemisphere) (Q40720559), summer (northern hemisphere) (Q40720564), autumn (northern hemisphere) (Q40720568), winter (northern hemisphere) (Q40720553), first half (Q40719687), second half (Q40719707), circa (Q5727902) maps to {{Complex date}} with corresponding option
Calling from templates
edit{{#invoke:Wikidata date|date|item=Q5600|property=P569|lang=en}}
- Inputs
- item - wikidata item ID
- property - property to capture
- lang - what language to display it in. If skipped than date will be shown in the language of the user.