Help:Data

This page is a translated version of the page Help:Dates and the translation is 46% complete.
Outdated translations are marked like this.
Other languages:
Bahasa Indonesia • ‎Basa Bali • ‎Deutsch • ‎English • ‎Nederlands • ‎dansk • ‎español • ‎français • ‎galego • ‎polski • ‎čeština • ‎русский • ‎српски / srpski • ‎հայերեն • ‎العربية • ‎বাংলা • ‎中文 • ‎日本語

Wikidata offers a series of properties with datatype time, which allow storage of basic information defining single point in time. Time datatype can be further expanded with custom qualifiers to allow great range of possible time expressions.

Model

Tijd datatype

Zie ook mw:Wikibase/DataModel/JSON#time

Pagina Special:ListDatatypes beschrijft tijd datatype als

Literal data field for a point in time. Given as a date and time with some precision and boundaries. The time is saved internally in the specified calendar model.
  • time – explicit value for point in time, represented as a timestamp resembling ISO 8601, e.g. +2013-01-01T00:00:00Z. The year is always signed and padded to have between 4 and 16 digits.
  • timezone – explicit value as a signed integer. Timezone information as an offset from UTC in minutes.
  • before – explicit integer value for how many units after the given time it could be. The unit is given by the precision.
  • after – explicit integer value for how many units before the given time it could be. The unit is given by the precision.
  • precision – explicit value encoded in a shortint. The numbers have the following meaning: 0 - billion years, 1 - hundred million years, ..., 6 - millennium, 7 - century, 8 - decade, 9 - year, 10 - month, 11 - day, 12 - hour, 13 - minute, 14 - second.
  • calendarmodel – explicit value given as a URI. It identifies the calendar model of the timestamp.

That is an accurate description of the saved structure; however, much of it is not being used at the moment:

  • time field can not be saved with precision higher than a "day".
  • We do not use before and after fields and use qualifiers instead to indicate time period.
  • timezone is also not used the encoding (Z) suggest UTC timezone (the date in London), but general practice on Wikidata is to save dates as reported in literature, which usually means in local timezone.
  • calendar – explicit value defining calendar model. Currently two calendar models are supported: proleptic Gregorian calendar (Q1985727) and proleptic Julian calendar (Q1985786)

Bijvoorbeeld, de eigenlijke data structuur van Adam Mickiewicz (Q79822) start time (P580) is

          ["P580"] = table {
            table {
              ["datatype"] = "time",
              ["datavalue"] = table {
                ["type"] = "time",
                ["value"] = table {
                  ["after"] = 0,
                  ["before"] = 0,
                  ["calendarmodel"] = "http://www.wikidata.org/entity/Q1985727",
                  ["precision"] = 9,
                  ["time"] = "+1838-01-01T00:00:00Z",
                  ["timezone"] = 0,
                },
              },
              ["hash"] = "1438e02cdfc7ff91f7e722fbbf09f5ba5dba259b",
              ["property"] = "P580",
              ["snaktype"] = "value",
            },
          }

Precisie

Below is a table with example time strings for several precision values. The strings can be accessed using Lua commands and are also used by QuickStatements (Q20084080)     .

The user interface interprets precision 7 (100 years) and 6 (1000 years) using strict historical definitions of those terms, which starts with year ending with 01 and ends with year ending with 00. That might be counterintuitive to some people. When using the precision 7 or 6 it is safer to avoid years with the last digits 00. One option is to use the earliest year that avoids the problem, such as 2001 for the 3rd millennium. Another option is to use a date near the midpoint of the range, such as 1950 for the 20th century.

Precisie tijdstempelreeks betekenis opmerkingen
11 dag +2021-01-24T00:00:00Z datum van vandaag
10 maand +2021-01-00T00:00:00Z deze maand
9 jaar +2021-00-00T00:00:00Z huidig jaar
8 decenium +2010-00-00T00:00:00Z 2010sdate QS:P,+2010-00-00T00:00:00Z/8 Any date in range 2010-2019 with precision 8 is interpreted as 2010s.
7 eeuw +1801-00-00T00:00:00Z 19de eeuw Gebruik "1801" met precisie 7 om de jaren 1800-1899 te beschrijven.
6 millennium +1500-00-00T00:00:00Z Tweede millennium Gebruik "2500" met precisie 6 om de jaren 2000-2999 te beschrijven.
4 honderd duizend jaren -2500000-01-01T00:00:00Z 2.500.000 jaar VC Example from 2,500th millennium BC (Q3273066) item.
3 miljoen jaren -13798000000-01-01T00:00:00Z 13.798 miljoen jaar VC Example from cosmic inflation (Q273508) item.
0 miljard jaren -5000000000-00-00T00:00:00Z 5 miljard jaar VC Example from Earth formation (Q3748186) item.


Qualifiers

Qualifiers can be used to explain or customize dates that cannot be fully represented by the date model above. The precision of the date being qualified should have a precision that encompasses the range described by the qualifiers, or be set to "unknown value" (["snaktype"] = "somevalue").

Example dates and how to save them
verklaring code Voorbeeld van
ongeveer 500 VC 500 BCE / sourcing circumstances (P1480) circa (Q5727902) Pythagoras (Q10261) date of death (P570)
na 741 / earliest date (P1319) year 741 Swanachild (Q291747) date of death (P570)
before 140s / latest date (P1326) 140s Pius I (Q83198) date of birth (P569)
tussen 586 en 569 VC / earliest date (P1319) 586 BCE
/ latest date (P1326) 569 BCE
Pythagoras (Q10261) date of birth (P569)
tussen ongeveer 1600 en ongeveer 1615 / earliest date (P1319) 1600.
/ latest date (P1326) 1615.
/ sourcing circumstances (P1480) circa (Q5727902)
Pieter Mulier the Elder (Q217640) date of birth (P569)
van 1384 / start time (P580) 1384. Mikołaj of Ściborz (Q11780990) floruit (P1317)
tot 1515 / end time (P582) 1515.
van 1405 tot 1420 / start time (P580) 1405.
/ end time (P582) 1420.
Master of Egerton (Q29609) floruit (P1317)
begin van de 11de eeuw 11. century / refine date (P4241) beginning of (Q40719727) Parascheva of the Balkans (Q6967370) date of birth (P569)
midden van de 18de eeuw 18. century / refine date (P4241) middle of (Q40719748) Zlata of Maglen (Q2512266) date of birth (P569)
eind april 2011 April 2011 / refine date (P4241) end of (Q40719766) Hoegaarden 0,0 (Q2198961) inception (P571)
first half of 1900s 1900s / refine date (P4241) first half (Q40719687) Monogrammist E. D. (Q40912154) floruit (P1317)
zomer van 1693 1693. / refine date (P4241) summer (northern hemisphere) (Q40720564) Hieronymus Janssens (Q3135313) date of death (P570)
herfst van 1653 1653. / refine date (P4241) autumn (northern hemisphere) (Q40720568) Adriaen van Utrecht (Q367970) date of death (P570)

Time qualifiers can also be used to provide more information about almost any statement. Those would be:

Eigenschappen

Full list of time properties can be found at Special:ListProperties/time.

Each person should have some properties related to lifespan:

Informatie Hoe op te slaan Opmerkingen
date of birth date of birth (P569) with precision "year" and qualifier determination method (P459)=age for a given year mentioned in source (Q21042816): if a source mentions a person's age in a given year, this can be included this way. If only the birthday of a person is known without the year birthday (P3150) can be used.
date of death date of death (P570) with qualifier latest date (P1326): if a source mentions his widow in a given year, this can be stated with qualifier P1326.
date of baptism in early childhood date of baptism in early childhood (P1636) For many people we only know precise date of baptism, not birth. Often year of birth is stored with precise date of baptism.
date of burial or cremation date of burial or cremation (P4602) Similarly to date of baptism, sometimes only precise date of burial is known, which is than used to estimate month or year of death.
date of disappearance date of disappearance (P746) Date or point of time a missing person was seen or otherwise known to be alive for the last time.
levend floruit (P1317) Date when a person was known to be alive. Can help determine if a person born after 1898 is still alive or when a person without date of birth first came into the public eye.
(super-)eeuweling significant event (P793)=centenarian (Q2944360)
significant event (P793)=supercentenarian (Q1200828)
Person known to have reached 100/110 years. Can help determine if a person born before 1921 or 1911 is still alive.
work period or period when someone flourished (Latin: floruit or fl.) Twee manieren om het op te slaan: floruit (P1317) means date or period during which a person was known to have been alive or active, which is a little broader meaning than work period, as it might store dates when someone was alive but not active. In practice many people for whom we do not know the lifespan dates, we know only through their work, so those two properties would store the same information. Often floruit (P1317) stores information like 15th century, while work period (start) (P2031) and work period (end) (P2032) would store more precise date range.

Time properties are also used to record significant dates related to artworks, books, buildings and other objects:

Informatie Property to store it Van toepassing op Hoe te gebruiken
inception inception (P571) artwork
book
map
music
organization
date or point in time when the organization/subject was founded/created
tijdstip van ontdekking time of discovery or invention (P575) artwork
artifact
astronomic objects
inventions
taxons
date when the item was discovered
dissolved, abolished or demolished date dissolved, abolished or demolished date (P576) organisatie
gebouw
date when an organization was dissolved/disappeared or a building demolished
publication date publication date (P577) boek
kaart
muziek
date or point in time a work is first published or released
eerste optreden date of first performance (P1191) work
music
date a work was first debuted, performed or broadcasted
time of earliest written record time of earliest written record (P1249)
discontinued date discontinued date (P2669) produkten date that the availability of a product was discontinued
production date production date (P2754) date of production of a creative work, if different from the publication date
date depicted date depicted (P2913) kunstwerk
boek
kaart
date depicted in a work
public domain date public domain date (P3893) kunstwerken
boeken
date the item enters into the public domain in a jurisdiction
date of official opening date of official opening (P1619) gebouw
evenement
date an event, institution, or building opened
date of official closure date of official closure (P3999) gebouw
evenement
date of official closure of a building or event
service entry service entry (P729) voertuig
apparatuur
date when a piece or class of equipment entered operational service
service retirement service retirement (P730) voertuig
apparatuur
date when a piece or class of equipment was retired from operational service
year of taxon publication year of taxon publication (P574) taxon date when a scientific name was formally established. Together with taxon author (P405) used as qualifier of taxon name (P225).
UTC date of spacecraft launch UTC date of spacecraft launch (P619) ruimteschip
time of spacecraft landing time of spacecraft landing (P620) ruimteschip
time of spacecraft orbit decay time of spacecraft orbit decay (P621) ruimteschip
spacecraft docking/undocking date spacecraft docking/undocking date (P622) ruimteschip
periapsis date periapsis date (P2285) astronomisch object time for perihelim/perigeum in each orbit for an astronomical object

Terugkerende data

For yearly recurring events there is day in year for periodic occurrence (P837), a special example is birthday (P3150). Help:Easter related dates helps with finding items for recurring days defined by their distance to Easter.

Property pairs for time periods

from to
inception (P571): date or point in time when the subject came into existence as defined dissolved, abolished or demolished date (P576): point in time at which the subject (organisation, building) ceased to exist; see "date of official closure" (P3999) for closing a facility, "service retirement" (P730) for retiring equipment, "discontinued date" (P2669) for stopping a product
discontinued date (P2669): date that the availability of a product was discontinued; see also "dissolved, abolished or demolished" (P576)
service retirement (P730): date or point in time on which a piece or class of equipment was retired from operational service
date of official closure (P3999): date of official closure of a building or event
date of official opening (P1619): date or point in time an event, museum, theater etc. officially opened date of official closure (P3999): date of official closure of a building or event
service entry (P729): date or point in time on which a piece or class of equipment entered operational service service retirement (P730): date or point in time on which a piece or class of equipment was retired from operational service
date of commercialization (P5204): date when a product was first commercialized discontinued date (P2669): date that the availability of a product was discontinued; see also "dissolved, abolished or demolished" (P576)
start time (P580): time an item begins to exist or a statement starts being valid end time (P582): time an item ceases to exist or a statement stops being valid
work period (start) (P2031): start of period during which a person or group flourished (fl. = "floruit") in their professional activity work period (end) (P2032): end of period during which a person or group flourished (fl. = "floruit") in their professional activity
start period (P3415): initial period in which the statement is valid (including the period-value) end period (P3416): last period in which the statement is still valid (including the period-value)
open period from (P3027): qualifier to P3025 (open days) for season when open days apply open period to (P3028): qualifier to P3025 (open days) for season when open days apply
start of covered period (P7103): start of period covered by an archive set, a historical book, or a collection end of covered period (P7104): end of period covered by an archive set, a historical book, or a collection
minimum date (property constraint) (P2310): qualifier to define a property constraint in combination with P2302 maximum date (property constraint) (P2311): qualifier to define a property constraint in combination with P2302. Use "unknown value" for current date.
date of the first one (P7124): qualifier: when was the first element of quantity appears/took place date of the latest one (P7125): qualifier: when was the latest element of quantity appears/took place
date of birth (P569): date on which the subject was born date of death (P570): date on which the subject died
date of baptism in early childhood (P1636): date when a person was baptized. For times when only baptism records were available, this can be a good substitute for date of birth.

Interface

Entry of exact dates

When a date in 2021 is entered, e.g. 2021-01-24, the calendar model is set by default to proleptic Gregorian calendar (Q1985727).

For current dates, this works fine.

For earlier dates, the applicable calendar should be determined:

  • The Gregorian calendar was first introduced in 1582 replacing the Julian calendar.
  • The last countries to convert from the Julian to the Gregorian calendar did so in the 1920s. → w:Adoption of the Gregorian calendar.

Depending on the country and the source at hand, the applicable calendar has to be determined and entered.

If it can't be determined if the date is in one or the other calendar, that date should be entered in the default calendar with the qualifier sourcing circumstances (P1480) = unspecified calendar (Q18195782).

Some countries did use or still use other calendars. None of these are supported. Dates need to be converted to Julian or Gregorian.

Onnauwkeurige data

In quite a few cases the exact date of an event (like a date of birth) is not known. We have several approaches depending on how the source documents it.

End of automatically generated list.
Precision

The first approach is to change the precision. For example when the source says 1620s:

  1. Add a date claim
  2. Enter a year (for example 1625)
  3. Click "advanced adjustments"
  4. Change the precision to something suitable (for example a decade)
  5. Add the source
  6. Save the statement
Qualifiers for earliest/latest

The first approach can be expanded if you know a before and/or after date. For example when the source says before 1625:

  1. Add the statement as above, but don't save it yet
  2. Add a qualifier latest date (P1326) and/or earliest date (P1319) with the date
  3. Save the statement
Qualifier for circa

The second approach is suitable if the source says around a certain date or year. For example "around 1622":

  1. Add a date claim with a certain date
  2. Enter the year (for example 1622)
  3. Add qualifier sourcing circumstances (P1480) -> circa (Q5727902)
  4. Add the source
  5. Save the statement

Jaar VC

  • Years BC should be entered as is.
Sample: Year 458 BC on Q309637#P39 is entered as "458 BCE" and appears as "458 BCE".
  • For RDF export (e.g. on Wikidata Query Service) the following applies: "The dates follow XSD 1.1 standard, i.e. 1 BCE is year 0."[1]. Year "0" is also exported as year 0, but only if it is Julian calendar, because non-Gregorian dates are passed through as is. Year 0 Gregorian is invalid in the database would not be exported. Year 2 BCE, as -1.
Sample: Year 458 BC on https://www.wikidata.org/wiki/Special:EntityData/Q309637.rdf appears as "<pq:P585 rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">-0457-01-01T00:00:00Z</pq:P585>". The same is visible on the below SPARQL query.
SELECT *
{
	VALUES ?item { wd:Q309637 }
  	?item p:P39 ?p1 . ?p1 pqv:P585 ?p3 . ?p3 ?p4 ?p5
}
LIMIT 100

Try it!

  • For RDF export (e.g. on Wikidata Query Service), dates BC (as any dates) are converted to Gregorian dates.
Sample: 27 November 8 BCE appears as "-0007-11-25T00:00:00Z"
  • For JSON export the format is inspired by XSD 1.0 and ISO 8601:1988. The year 0 is undefined, 1 BCE is exported as -0001, 2 BCE is exported as -0002, etc.

Filter dates inside sparql queries

Examples of syntax:

Use cases for query on dates
Use case Sparql
Any event that occurred between year X and year Y
SELECT ?item ?itemLabel ?time
WHERE
{
  ?item wdt:P585 ?time.
  FILTER (   YEAR(?time) > 1450 && YEAR(?time) < 1454  ).
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
Try it!
Any event that occurred between a date X and a date Y
SELECT ?item ?itemLabel ?time
WHERE
{
  ?item wdt:P585 ?time.
  FILTER ((?time > "1452-01-01"^^xsd:dateTime) && (?time < "1452-12-31"^^xsd:dateTime)).
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
Try it!
Any event that happened on a specific date
SELECT ?item ?itemLabel
WHERE
{
  ?item wdt:P585 "+1789-07-14T00:00:00Z"^^xsd:dateTime.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
Try it!
People born in 1700 with day or month precision dates
SELECT ?item ?itemLabel ?time ?precision
WHERE
{
  VALUES ?precision { 10 11 }
  ?item p:P569/psv:P569 [wikibase:timePrecision ?precision; wikibase:timeValue ?time].
  FILTER (   YEAR(?time) = 1700 ).
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} 
LIMIT 10
Try it!

Known issues

See Phab:T87764 (Bugs related to time datatype (tracking))

  • In 2015, the format for dates was changed. Julian dates entered before are likely to be off a few days.
  • Some dates may have year precision, but have been entered as day precision
  • The documentation indicates the time zone exists, but the only time zone that can be entered is an offset of 0 from W:universal time. Since it is impossible to capture the time zone of the source, most of the dates in Wikipedia are, strictly speaking, false.
  • See Phab:T95553. The user interface accepts and presents dates with precision 7 (100 years) strangely, enticing editors to enter incorrect dates.

Zie ook

Notes

  1. mw:Wikibase/Indexing/RDF_Dump_Format#Time