core
core copied to clipboard
Test and document Date ranges
Test that filtering content by date range is working and also update the help in the contentlet portlet accordingly.
Current message says:
A range of dates and times can be queried using the TO keyword, as in the following example: [02/02/2006 03:00:00AM TO 01/01/2100 23:59:59 03:00:00AM]
When only a date is specified in the range, the system will automatically add the time to the range
(e.g. [02/02/2006 TO 01/01/2100] will be changed to [02/02/2006 00:00:00 TO 01/01/2100 23:59:59]).
Date and Time can be queried in one of two different formats: MM/dd/yyyy hh:mm:ss [AM|PM] or yyyyMMddHHmmss.
Queries using wildcards (*) can only be performed when using the date format yyyyMMddHHmmss, e.g. 2008030103*.
PR Core: https://github.com/dotCMS/core/pull/13845
Passed QA. Date/time format tested successfully through Query tool and Contentlet portlet:
- Date/time = MM/dd/yyyy hh:mm:ss
- Date = MM/dd/yyyy
- Date/time = MM/dd/yyyy hh:mm:ss [AM|PM|am|pm]
- Date/time = yyyyMMddHHmmss
Tested on master branch Mac OS 10.10 / Postgres 9.6.6 / Chrome v64.0.3282.167 / Tomcat 8 / Java 8.6
Modified message:
A range of dates and times can be queried using the TO keyword, as in
the following example: [02/02/2006 03:00:00 TO 01/01/2100 23:59:59]
When only a date is specified in the range, the system will automatically add the time to
the range (e.g. [02/02/2006 TO 01/01/2100] will be changed to
[02/02/2006 00:00:00 TO 01/01/2100 23:59:59]).
Date and Time can be in one of three different formats: MM/dd/yyyy hh:mm:ss[AM|PM],
MM/dd/yyyy HH:mm:ss or yyyyMMddHHmmss.