From Placeography

Jump to: navigation, search

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.


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,

    [[date of birth:=+]]
    [[date of birth:=*%b %d]]

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.

See improving date type.

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).

Minimum date/time:

which is 2^31 seconds before 1 Jan 1970, 01:00:00.

Maximum date/time:

which is this amount of time after 1 Jan 1970, 00:59:59.

See also Date range.

Thus this type is unsuitable for many historic dates!

See also [1], [2].

This type is among the standard datatypes of this wiki.

Properties of type "Date"

Showing 5 properties using this type.






Personal tools
[http://discussions.mnhs.org/HP/oneonone.cfm snubnosed]