0 users online. Create an account or sign in to join them.Users

Search

Playing around with the new calender widget in 2.6beta I noticed it is actually possible to use dates like:

<datum iso="1817-02-09T08:52:49+01:00" timestamp="-4824806831" time="08:52" weekday="7" offset="+0100">1817-02-09</datum>

I remember this was impossible with the date and time field. @brendo @nils are there any pitfalls with this, or should it simply work fine? (I don’t mind the negative timestamp :)

I remember this was impossible with the date and time field.

Really? I can't remember that there was that kind of limitation.

Some function was not able to use historic dates, I can’t remember where exactly the problem was. Might have been:

strtotime() has a range limit between Fri, 13 Dec 1901 20:45:54 GMT and Tue, 19 Jan 2038 03:14:07 GMT; although prior to PHP 5.1.0 this range was limited from 01-01-1970 to 19-01-2038 on some operating systems (Windows).

@stackoverflow

Another problem is still making me stick to a solution with a field for each year, month, day though: ISO-dates have no support for missing data, e. g. when only year or year-month is known.

Symphony is using PHP's DateTime class and not strtotime() and from the comments on the PHP site, the supported date range is -9999-01-01 through 9999-12-31.

Another problem is still making me stick to a solution with a field for each year, month, day though: ISO-dates have no support for missing data, e. g. when only year or year-month is known.

Yeah, some kind of wildcard for missing date information would be really helpful for historic content. I think your solution to have separate fields for all date components is the best approach.

I think your solution to have separate fields for all date components is the best approach.

*pats himself on the shoulder*

thanks :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.1
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details