Type:Date

From SOWNWiki

Jump to: navigation, search

The content below is taken from http://semantic-mediawiki.org/wiki/Type:Date


This somewhat experimental datatype parses dates and date-times in various formats. It internally stores the date as the number of seconds since 1970 and displays dates in the international standard ISO8601 YYYY-MM-DDTHH:MM:SS format.

Contents

Recognized entry formats

We recommend you use the unambiguous international standard ISO8601 YYYY-MM-DDTHH:MM:SS format when entering values for date attributes. However, all the underlying power of the PHP strtotime() function is available. Because many date values are ambiguous, check the factbox to see what it displays for dates you enter.

Display format

Normally dates in query results display in ISO8601 format.

In inline queries, you can specify a date format string to control how the date displays. The format string is the same as the PHP strftime() function. Thus for example,

 <ask>
    [[date of birth:=+]]
    [[date of birth:=*%b %d]]
  </ask>

will show just the month and day part of a date in "Jul 6" format.

Date Issues

Internally it uses the PHP strtotime function to parse the date. It does not use your date/time preferences in MediaWiki.

Timezone is accepted but not remembered, locale-specific date formats (e.g. mm/dd/yy versus dd/mm/yy) are ambiguous and their parsing may depend on PHP settings.


Date ranges

In SMW 0.5, the range is only from 1901-12-14 to 2038-1-19. This limitation comes from PHP (the timestamp is a 32-bit signed number).


See also [1], [2].


This type is among the standard datatypes of this wiki.

Properties of type “Date”

Showing 11 properties using this type.

A

D

H

Hcont.

L

M

Mcont.

W