Help:日付
ウィキデータでは、「時刻」をデータ型とするプロパティを使用して、ある時点での情報を保存することができます。「時刻」のデータ型は、修飾子によってさらに拡張することができ、さまざまな時間表現を可能にします。日付の追加と抽出は単純に見えるかもしれませんが、利用可能な精度や暦の変更によって複雑になります。
モデル
時刻データ型
- mw:Wikibase/DataModel/JSON#timeも参照してください
時刻データ型について、Special:ListDatatypesページでは以下のように書かれています。
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.
これは保存されている構造の正確な記述ではありますが、そのほとんどは現時点では使用されていません。
time
フィールドは「日」より細かい精度で保存することができません。before
およびafter
フィールドは使わず、期間を示すには代わりに修飾子を使用します。timezone
も使わず、ZというエンコードがUTC(ロンドン時)を示唆するにも関わらず、日付を文献に記されたとおり、つまり通常は地方のタイムゾーンでの日付を保存するのがWikidataでの慣行です。calendar
- 暦モデルを定義する明示的値。現在は次の2つのモデルをサポートしています:proleptic Gregorian calendar (Q1985727) および proleptic Julian calendar (Q1985786)
たとえば、Adam Mickiewicz (Q79822)start time (P580)の実際のデータ構造は次のとおりです。
["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", }, }
精度
以下の表は精度の値をtime
文字列の具体例とともに示しています。この文字列はLuaコマンドを使ってアクセスでき、またQuickStatements (Q20084080) が使用しています。
ユーザーインターフェースは、精度7(100年)と6(1000年)をこの語の厳密な歴史的定義、つまり末尾が01の年に始まり末尾が00で終わるものとして解釈します。これが直感に反すると感じる人々もいるかもしれません。精度7および6を使うときには、末尾が00とならないように指定する方が安全です。この問題を避けられる最初の年、たとえば第3ミレニアムに対しては2001を使うのも一つの方法です。あるいは期間の真ん中に近い時点、たとえば20世紀に対して1950を使う手もあります。
精度 | タイムスタンプ文字列 | 意味 | 備考 | |
---|---|---|---|---|
11 | 日 | +2024-09-20T00:00:00Z
|
今日 | |
10 | 月 | +2024-09-00T00:00:00Z
|
今月 | |
9 | 年 | +2024-00-00T00:00:00Z
|
今年 | |
8 | 十年 | +2010-00-00T00:00:00Z
|
2010年代 | 精度8で2010-2019の範囲の日付は2010年代として解釈されます。 |
7 | 世紀 | +1801-00-00T00:00:00Z
|
19世紀 | 精度7で1801-1900の範囲の日付は19世紀として解釈されます。これはウィキペディア記事で説明されている世紀の厳密な歴史的定義に沿ったものです。これが直感に反すると感じる人もいるかもしれません。とりわけ十年代(decade)の定義と合いませんし、また言語によっては19世紀のような言葉を用いずに、1800年代のような表現を用いている場合もあるからです。 |
6 | 千年紀 | +1500-00-00T00:00:00Z
|
第2ミレニアム | 精度6で1001-2000の範囲の日付は19世紀として解釈されます。世紀の場合と同様、これが直感に反すると感じる人もいるかもしれません。 |
4 | 十万年 | -2500000-01-01T00:00:00Z
|
紀元前2,500,000年 | 2,500th millennium BC (Q3273066)項目からの例。 |
3 | 百万年 | -13798000000-01-01T00:00:00Z
|
紀元前137億9800万年 | inflation (Q273508)項目からの例。 |
0 | 十億年 | -5000000000-00-00T00:00:00Z
|
紀元前50億年 | earth formation (Q3748186)項目からの例。 |
時、分、秒
2021年時点で11(日)より細かい精度はサポートされていません。以下を含みます。
精度 | タイムスタンプ文字列 | 意味 | |
---|---|---|---|
14 | 秒 | +2024-09-20T20:21:22Z
|
今日の20時21分22秒 |
13 | 分 | +2024-09-20T20:21:00Z
|
今日の午後8時21分 |
12 | 時 | +2024-09-20T20:00:00Z
|
今日の午後8時 |
これを可能にするための機能リクエストが phab:T57755 にあります。
APIの不具合のため、ウィキデータにはこのような精度を持つ値がいくつか存在しています。
対処法として修飾子 located in time zone (P421) を使い、さらに修飾子refine date (P4241)(以下参照)に項目 11 PM (Q44529925), 23:00 (Q55812301) あるいは 23:00:00 (Q95135875) を指定する方法があります。この3種には時、分、秒、という精度の違いがあることに留意してください。分単位の項目の一覧はlists/time of the dayにあります。
専用の修飾子についての提案もありました (Property proposal/local time)。
プロパティ opening time (P8626) および closing time (P8627) は時刻項目も値として使用できます。そのような範囲について、それか文字列に基づく形式のどちらかをサポートしようという議論もありました。
修飾子
修飾子を使って、上述の日付モデルでは完全に表現することができない日付を説明またはカスタマイズすることができます。修飾されている日付の精度が修飾子によって記述される範囲を包含する精度であるか、あるいは「不明な値」 (["snaktype"] = "somevalue"
) に設定すべきです。
- earliest date (P1319) および/または latest date (P1326) - ある事象が起こった可能性がある最も早い時刻と最も遅い時刻。
- start time (P580) および/または end time (P582) - 期間の開始と終了の時刻。
- sourcing circumstances (P1480) 文の正確さを示す修飾子。許容される値:circa (Q5727902)、near (Q21818619)、presumably (Q18122778)、disputed (Q18912752)、など。
- 日付の精度を絞り込むrefine date (P4241)修飾子。許容される値:
- 時期、beginning of (Q40719727)、middle of (Q40719748)およびend of (Q40719766)など
- 半期、たいていは年、十年紀、または世紀のfirst half (Q40719687)およびsecond half (Q40719707)
- 四半期、たいていは世紀のfirst quarter (Q40690303)、second quarter (Q40719649)、third quarter (Q40719662)および fourth quarter (Q40719674)
- 季節、北半球および南半球で観測されるもの
- winter (northern hemisphere) (Q40720553)、spring (northern hemisphere) (Q40720559)、summer (northern hemisphere) (Q40720564)、autumn (northern hemisphere) (Q40720568)
- winter (southern hemisphere) (Q40720946)、spring (southern hemisphere) (Q40720950)、summer (southern hemisphere) (Q40720953)、autumn (southern hemisphere) (Q40720956)
- 日付の例と保存の仕方
時刻修飾子は、ほとんどすべての文に関して、さらなる情報を提供するために使うこともできます。以下のようなものです:
- ある文が真であった期間を記述するためのstart time (P580)およびend time (P582)
- ある文が真であった時点を記述するためのpoint in time (P585)
プロパティ
時刻プロパティの完全な一覧はSpecial:ListProperties/timeで見ることができます。
それぞれの人物は生涯に関するいくつかのプロパティを持っているはずです:
情報 | 保存方法 | 備考 |
---|---|---|
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 | date of baptism (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. |
存命 | floruit (P1317) | Date when a person was known to be alive. Can help determine if a person born after 1901 is still alive or when a person without date of birth first came into the public eye. |
(スーパー)センテナリアン | significant event (P793)=centenarian (Q2944360) significant event (P793)=supercentenarian (Q1200828) |
100歳/110歳に達したことが判明している人物。1924年または1914年より前に生まれた人物がまだ生きているかどうかを判断するのに役立ちます。 |
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. |
時刻プロパティは芸術作品、書籍、建物およびその他の物に関する重要な日付を記録するためにも使われます:
情報 | 保存するプロパティ | 適用対象 | 使い方 |
---|---|---|---|
inception | inception (P571) | artwork book map music organization |
date or point in time when the organization/subject was founded/created |
time of discovery | 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) | organization building |
date when an organization was dissolved/disappeared or a building demolished |
publication date | publication date (P577) | book map music |
date or point in time a work is first published or released |
初演 | date of first performance (P1191) | 作品 楽曲 |
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) | 製品 | 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 book map |
date depicted in a work |
public domain date | public domain date (P3893) | artworks books |
date the item enters into the public domain in a jurisdiction |
date of official opening | date of official opening (P1619) | building event |
date an event, institution, or building opened |
date of official closure | date of official closure (P3999) | building event |
date of official closure of a building or event |
service entry | service entry (P729) | vehicle equipment |
date when a piece or class of equipment entered operational service |
service retirement | service retirement (P730) | vehicle equipment |
date when a piece or class of equipment was retired from operational service |
year of publication of scientific name for taxon | year of publication of scientific name for taxon (P574) | タクソン | 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) | 宇宙機 | |
UTC date of spacecraft landing | UTC date of spacecraft landing (P620) | 宇宙機 | |
time of object orbit decay | time of object orbit decay (P621) | 宇宙機 | |
spacecraft docking/undocking date | spacecraft docking/undocking date (P622) | 宇宙機 | |
periapsis date (DEPRECATED) | periapsis date (DEPRECATED) (P2285) | 天体 | 天体について各軌道の近日点/近地点の時刻 |
繰り返す日付
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
開始 | 終了 |
---|---|
inception (P571): time when an entity begins to exist; for date of official opening use P1619 | 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 or service was discontinued; see also "dissolved, abolished or demolished" (P576) and "service retirement" (P730) for pieces or classes of equipment | |
service retirement (P730): date or point in time on which a piece or class of equipment was retired from operational service ; use P2669 for end of a public 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 ; use P2669 for end of a public service |
date of commercialization (P5204): date when a product was first commercialized | discontinued date (P2669): date that the availability of a product or service was discontinued; see also "dissolved, abolished or demolished" (P576) and "service retirement" (P730) for pieces or classes of equipment |
start time (P580): time an entity begins to exist or a statement starts being valid | end time (P582): moment when an entity 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 "property constraint" (P2302) | maximum date (property constraint) (P2311): qualifier to define a property constraint in combination with "property constraint" (P2302). Use "unknown value" for current date. |
date of the first one (P7124): qualifier: when the first element of a quantity appeared/took place | date of the latest one (P7125): qualifier: when the latest element of a quantity appeared/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 (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. |
インターフェイス
正確な日付の入力
2024年の日付、例えば2024-09-20が入力されると、暦モデルは既定でproleptic Gregorian calendar (Q1985727)に設定されます。
現在の日付については、これでうまくいきます。
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.
- On manual entry, the software defaults to proleptic Gregorian calendar (Q1985727) from 1583.
- Dates before are considered by default as proleptic Julian calendar (Q1985786).
- In the advanced options, the calendar model can be changed.
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.
不正確な日付
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:
- Add a date claim
- Enter a year (for example 1625)
- Click "advanced adjustments"
- Change the precision to something suitable (for example a decade)
- Add the source
- 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:
- Add the statement as above, but don't save it yet
- Add a qualifier latest date (P1326) and/or earliest date (P1319) with the date
- 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":
- Add a date claim with a certain date
- Enter the year (for example 1622)
- Add qualifier sourcing circumstances (P1480) -> circa (Q5727902)
- Add the source
- Save the statement
紀元前の年
- 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
- 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.
- Sample: Year 458 BC on https://www.wikidata.org/wiki/Special:EntityData/Q309637.json appears as
"{"time":"-0458-00-00T00:00:00Z","timezone":0,"before":0,"after":0,"precision":9,"calendarmodel":"http://www.wikidata.org/entity/Q1985786"}"
Filter dates inside sparql queries
構文の例:
使用事例 | Sparql |
---|---|
X年から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" }
}
|
X日から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" }
}
|
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" }
}
|
People born in 1700 with day or month precision dates | SELECT ?item ?itemLabel ?time ?precision
WHERE
{
VALUES ?precision { 10 11 }#10 = month precision, 11 = day precision
?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
|
日付としての1月1日
date of birth (P569)からいくつかの日付:
rank | January 1 | January 2 | January 3 |
---|---|---|---|
Normal rank | 21946 | 10842 | 10811 |
Preferred rank | 284 | 151 | 153 |
Deprecated rank | 1649 | 6 | 8 |
∑ | 23879 | 10999 | 10972 |
- 2022-02-02現在
- Query
A January 1 date of birth (P569) can occur for several reasons:
- (A) a person was born on January 1
- (B) a person's birth was registered as being on January 1
- (C) a person's exact date of birth is unknown, but was officially registered with the year and "January 1"
- (D) a database stores year precision dates with "January 1"
- (E) a conversion between some database and Wikidata led to the year of birth added as January 1 of that year.
Wikidata would generally include (A), (B), (C) with the appropriate reference and rank. (D) would generally be stored with deprecated rank or year precision. (E) should be corrected by changing the date precision to year.
同様の問題は、例えばdate of death (P570)など、他の日付でも見つかります。
既知の問題点
Phab:T87764参照(時刻データ型に関連するバグ(追跡中))
- 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.
関連項目