Zum Inhalt springen

Gespräch:Date Formatting in SMW

aus AufEinWort, der freien Forschung

Über diese Seite Gespräch

SMW Datumsformatierung
ChatGPT Sophos GPT-4
8. April 2025 n. Chr. erst.  
Ausgabe 00
Ausgabe 00
unüberarbeitet ungeprüft
keine Datei

Hi Sophos:

I would like to know how to properly use the "Date" property in Semantic MediaWiki to record a person's birth and death dates within the source text.

Consider the following examples from the current text:

Aristotle * 384 BC in Stageira; † 322 BC in Chalkis on Euboea)

Johann Wolfgang Goethe, (* August 28, 1749 in Frankfurt am Main; † March 22, 1832 in Weimar)

Please read the entire page https://www.semantic-mediawiki.org/wiki/Help:Type_Date thoroughly and systematically—without assumptions or inferences based on structure, language, or design.

Identify all relevant information regarding the recording of each date as a property for a person's birth and death, especially the formatting of the era, regardless of their position.

Compile any supplementary or contradictory information and provide a consolidated, verified response.

Give equal consideration to all sections, not just early-appearing content.

Refer exclusively to information from the domain https://www.semantic-mediawiki.org.=== Sophos: ===


In Semantic MediaWiki (SMW), to accurately record a person's birth and death dates using the "Date" datatype, it's essential to adhere to specific formatting guidelines, especially when dealing with dates from different eras.

Formatting Dates:

  • Common Era (CE) Dates: For dates occurring in the Common Era, use the standard format:Semantic MediaWiki
    • Example: [[Has birthdate::August 28, 1749]] for Johann Wolfgang Goethe's birthdate.
  • Before Common Era (BCE) Dates: For dates before the Common Era, append "BC" to the date:
    • Example: [[Has birthdate::January 1 384 BC]] for Aristotle's birthdate.

SMW supports various input formats, including:Semantic MediaWiki+2Semantic MediaWiki+2Semantic MediaWiki+2

  • Feb 11 2000Semantic MediaWiki+1Semantic MediaWiki+1
  • 2000-02-11Semantic MediaWiki
  • Jan 1 300 BCSemantic MediaWiki+1Semantic MediaWiki+1

It's important to note that SMW assumes there is no "year 0": the sequence transitions directly from 1 BC to AD 1.Semantic MediaWiki+1Semantic MediaWiki+1

Specifying Calendar Models:

SMW defaults to the Gregorian calendar for dates after October 15, 1582, and the Julian calendar for dates before this. To explicitly specify the calendar model:Semantic MediaWiki+1Semantic MediaWiki+1

  • Julian Calendar: Append "Jl" to the date.
    • Example: [[Has birthdate::February 11 1492 Jl]]
  • Gregorian Calendar: Append "Gr" to the date.
    • Example: [[Has birthdate::February 11 1492 Gr]]

This ensures clarity, especially for dates around the calendar transition period. Semantic MediaWiki

Handling Incomplete Dates:

SMW allows for partial dates:Semantic MediaWiki

  • Year Only: [[Has birthdate::2000]]Semantic MediaWiki+1Semantic MediaWiki+1
  • Month and Year: [[Has birthdate::February 2000]]Semantic MediaWiki+1Semantic MediaWiki+1

Internally, these are interpreted with default values (e.g., January 1 for year-only dates), but they display as entered.Semantic MediaWiki

Time Zones and Offsets:

While SMW records dates in the server's local time, you can specify time offsets:Semantic MediaWiki+1Semantic MediaWiki+1

  • Example: [[Has birthdate::February 11 2000 10:00:00+02:00]]Semantic MediaWiki+2Semantic MediaWiki+2Semantic MediaWiki+2

This denotes February 11, 2000, at 10:00 AM with a +02:00 hour offset. Semantic MediaWiki

Displaying Dates:

To control date display formats in query results:

  • ISO Format: Use #ISOSemantic MediaWiki+3Semantic MediaWiki+3Semantic MediaWiki+3
    • Example: ?Has birthdate#ISO displays dates as 2000-02-11.
  • MediaWiki's Localization: Use #MEDIAWIKISemantic MediaWiki+3Semantic MediaWiki+3Semantic MediaWiki+3
    • This aligns with user language preferences but may not support all date values, especially BCE dates.Semantic MediaWiki

Practical Application:

For Johann Wolfgang Goethe:

wiki

KopierenBearbeiten

[[Has birthdate::August 28, 1749]]

[[Has deathdate::March 22, 1832]]

For Aristotle:

wiki

KopierenBearbeiten

[[Has birthdate::January 1 384 BC]]

[[Has deathdate::January 1 322 BC]]

In these examples, the dates are formatted according to SMW's guidelines, ensuring accurate data representation.

By following these conventions, you can effectively record and display historical dates in Semantic MediaWiki, maintaining both accuracy and clarity.