From Wikidata
Jump to navigation Jump to search

Other languages:
English • ‎Nederlands • ‎dansk • ‎français • ‎српски / 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.


Time datatype[edit]

See also mw:Wikibase/DataModel/JSON#time

Page Special:ListDatatypes describes time datatype as

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)

For example, the actual data structure of Adam Mickiewicz (Q79822)start time (P580)   is

          ["P580"] = table {
            table {
              ["datatype"] = "time",
              ["datavalue"] = table {
                ["type"] = "time",
                ["value"] = table {
                  ["after"] = 0,
                  ["before"] = 0,
                  ["calendarmodel"] = "",
                  ["precision"] = 9,
                  ["time"] = "+1838-01-01T00:00:00Z",
                  ["timezone"] = 0,
              ["hash"] = "1438e02cdfc7ff91f7e722fbbf09f5ba5dba259b",
              ["property"] = "P580",
              ["snaktype"] = "value",


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) View with Reasonator View with SQID.

The user interface interprets precision 7 (100 years) and 8 (1000 years) strangely, as mentioned in section "#Known issues". When using the precision 7 or 8 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 1901 if the date is between 1900 and 1999 inclusive. Another option is to use a date near the midpoint of the range, such as 2500 if the date is between 2000 and 2999 inclusive.

precision timestamp string meaning comments
11 day +2018-12-14T00:00:00Z today's date
10 month +2018-12-00T00:00:00Z this month
9 year +2018-00-00T00:00:00Z current year
8 decade +2010-00-00T00:00:00Z 2010s Use "2010" with precision 8 to specify decade 2010-2019.
7 century +1801-00-00T00:00:00Z 1800s Use "1801" with precision 7 to specify years 1800-1899.
6 millennium +2500-00-00T00:00:00Z Second millenium Use "2500" with precision 6 to specify years 2000-2999.
4 hundred thousand years -2500000-01-01T00:00:00Z 2,500,000 years BCE Example from 2,500th millennium BC (Q3273066) item.
3 million years -13798000000-01-01T00:00:00Z 13,798 million years BCE Example from cosmic inflation (Q273508) item.
0 billion years -5000000000-00-00T00:00:00Z 5 billion years BCE Example from Earth formation (Q3748186) item.


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
statement code Example from
circa 500 BCE   500 BCE / sourcing circumstances (P1480)circa (Q5727902) Pythagoras (Q10261)date of death (P570)  
after 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)  
between 586 and 569 BCE    / earliest date (P1319)586 BCE
   / latest date (P1326)569 BCE
Pythagoras (Q10261)date of birth (P569)  
between circa 1600 and circa 1615    / earliest date (P1319)1600.
   / latest date (P1326)1615.
   / sourcing circumstances (P1480)circa (Q5727902)
Pieter Mulier the Elder (Q217640)date of birth (P569)  
from 1384    / start time (P580)1384. Mikołaj of Ściborz (Q11780990)floruit (P1317)  
until 1515    / end time (P582)1515.
from 1405 until 1420    / start time (P580)1405.
   / end time (P582)1420.
Master of Egerton (Q29609)floruit (P1317)  
beginning of 11. century   11. century / refine date (P4241)beginning of (Q40719727) Parascheva of the Balkans (Q6967370)date of birth (P569)  
middle of 18. century   18. century / refine date (P4241)middle of (Q40719748) Zlata of Maglen (Q2512266)date of birth (P569)  
end of 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)  
summer of 1693   1693. / refine date (P4241)summer (northern hemisphere) (Q40720564) Hieronymus Janssens (Q3135313)date of death (P570)  
autumn of 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:


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

Each person should have some properties related to lifespan:

Information How to store it Comments
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.
alive floruit (P1317) Date when a person was known to be alive. Can help determine if a person born after 1895 is still alive or when a person without date of birth first came into the public eye.
(super-)centenarian 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 1918 or 1908 is still alive.
work period or period when someone flourished (Latin: floruit or fl.) Two ways to store it: 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:

Information Property to store it Applies to How to use it
inception inception (P571) artwork
date or point in time when the organization/subject was founded/created
time of discovery time of discovery or invention (P575) artwork
astronomic objects
date when the item was discovered
dissolved, abolished or demolished dissolved, abolished or demolished (P576) organization
date when an organization was dissolved/disappeared or a building demolished
publication date publication date (P577) book
date or point in time a work is first published or released
first performance date of first performance (P1191) work
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) products 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) artwork
date depicted in a work
public domain date public domain date (P3893) artworks
date the item enters into the public domain in a jurisdiction
date of official opening date of official opening (P1619) building
date an event, institution, or building opened
date of official closure date of official closure (P3999) building
date of official closure of a building or event
service entry service entry (P729) vehicle
date when a piece or class of equipment entered operational service
service retirement service retirement (P730) vehicle
date when a piece or class of equipment was retired from operational service
year of taxon name publication year of taxon name publication (P574) taxon date when a scientific name was formally established. Together with taxon author (P405) used as qualifier of taxon name (P225).
time of spacecraft launch time of spacecraft launch (P619) spacecraft
time of spacecraft landing time of spacecraft landing (P620) spacecraft
time of spacecraft orbit decay time of spacecraft orbit decay (P621) spacecraft
spacecraft docking/undocking date spacecraft docking/undocking date (P622) spacecraft
periapsis date periapsis date (P2285) astronomical object time for perihelim/perigeum in each orbit for an astronomical object

Recurring dates[edit]

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.


Entry of exact dates[edit]

When a date in 2018 is entered, e.g. 2018-12-14, 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.

Inexact dates[edit]

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.

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 be 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

Years BC[edit]

  • 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 appears as "<pq:P585 rdf:datatype="">-0457-01-01T00:00:00Z</pq:P585>". The same is visible on the below SPARQL query.
	VALUES ?item { wd:Q309637 }
  	?item p:P39 ?p1 . ?p1 pqv:P585 ?p3 . ?p3 ?p4 ?p5

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.

Known issues[edit]

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.

See also[edit]


  1. mw:Wikibase/Indexing/RDF_Dump_Format#Time