[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qgis-developer
Subject:    [QGIS-Developer] QDateTimeEdit: setting a useful minimum Date
From:       Mark Johnson <mj10777 () googlemail ! com>
Date:       2017-07-11 16:28:54
Message-ID: CAEEbjBiUiXRB_Cssv35b1x4kOuHAr-1L-ERUQH0CzSzpcs+5_Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


While working on an overhaul of the QgsSpatiaLiteProvider (for Spatialite
4.5.0), I just completed the portion for setting the default DATE/DATETIME
etc. only to find that for the QDateTimeEdit class, the beginning or the
world is determined by the Act of Parliament of 1751 (Calendar Act) - which
is a disaster for any Historical Database for any event before 1752-09-14.

Therefore it would be a good idea to set the lowest Date that can be
displayed as Qt::ISODate (0001-01-01T00:00:00) for all QDateTimeEdit being
used:
- minimumDateTime(QDateTime(QDate::fromString( "0001-01-01", Qt::ISODate
)));
(QDateTime can store lower Dates, but they cannot be displayed as an
ISODate)

If somebody could give a hint as to where the 'Feature Attributes" Dialog
is, I could try this out tomorrow.

Mark Johnson

[Attachment #5 (text/html)]

<div dir="ltr">While working on an overhaul of the  QgsSpatiaLiteProvider (for \
Spatialite 4.5.0), I just completed the portion for setting the default DATE/DATETIME \
etc. only to find that for the QDateTimeEdit  class, the beginning or the world is \
determined by the  Act of Parliament of 1751 (Calendar Act) - which is a disaster for \
any Historical Database for any event before 1752-09-14.<div><br></div><div>Therefore \
it would be a good idea to set the lowest Date that can be displayed as Qt::ISODate \
(0001-01-01T00:00:00) for all QDateTimeEdit being used:</div><div>- \
minimumDateTime(QDateTime(QDate::fromString( &quot;0001-01-01&quot;, Qt::ISODate \
)));<br></div><div>(QDateTime can store lower Dates, but they cannot be displayed as \
an ISODate)</div><div><br></div><div>If somebody could give a hint as to where the \
&#39;Feature Attributes&quot; Dialog is, I could try this out \
tomorrow.</div><div><br></div><div>Mark Johnson</div></div>


[Attachment #6 (text/plain)]

_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic