Opened 10 years ago

Closed 10 years ago

#220 closed enhancement (fixed)

Add a more friendly way to enter dates in search window and accessDate field

Reported by: dstillman Owned by: dstillman
Priority: major Milestone: 1.0.0
Component: interface Version: 1.0
Keywords: Cc:

Description (last modified by dstillman)

Currently dates have to be entered in SQL form ("2006-08-28"), which obviously won't do -- it should either accept certain date forms, à la strtotime() (e.g. 8/28/06, though it'd have to handle localized forms too), have separate drop-downs for month/day/year, or have a pop-up calendar.

Alternatively (or in addition) there should be a new multipart operator: "In the last" ___ "days/weeks/months"

Change History (4)

comment:1 Changed 10 years ago by dstillman

  • Description modified (diff)

comment:2 Changed 10 years ago by dstillman

  • Milestone changed from 1.0 Beta 2 to 1.0 Final
  • Summary changed from Add a more friendly way to enter dates in search window to Add a more friendly way to enter dates in search window and accessDate field

comment:3 Changed 10 years ago by dstillman

(In [858]) Much improved date handling in searches and autocomplete

Fixes #338, Dates in search window should be converted to UTC before searching
Addresses #220, Add a more friendly way to enter dates in search window and accessDate field

  • Unless passed a full datetime, the search system automatically parses the string with strToDate(), so one can search for an accessDate, etc., using a freeform phrase. It will use the SQL parts where available and also search for remaining words individually, so "November 6, 2006" will find '2006-10-06 Nov. 6 2006' and "Summer 2006" will find '2006-00-00 Summer 2006". It will also properly handle SQL parts, so "August 2006" in the is/isNot operator will use "LIKE '2006-08-'" (underscore being the single-character wildcard) and isBefore will use '2006-08-00'
  • Stored UTC dates are converted to localtime in the search system when searching on just a date part, since otherwise searching for a local date with a UTC timestamp after midnight would be unsuccessful
  • Date field autocomplete is now disabled in the search dialog, but on the off-chance that it's used somewhere, the autocomplete will now return just the user part of a multipart date field
  • Access date autocomplete only returns date, not datetime
  • Fix for Date Added and Date Modified showing as UTC
  • Date.isSQLDateTime()

Known issues:

  • accessDate field in metadata pane still requires SQL format
  • Proper parsing of search dates with no years (e.g. searching for "August 25") depends on #389, "Date.strToDate() should return available parts even if no year"

comment:4 Changed 10 years ago by dstillman

  • Resolution set to fixed
  • Status changed from new to closed

(In [1162]) Closes #220, Add a more friendly way to enter dates in search window and accessDate field
Addresss #352, Make sure data layer doesn't allow bad data via the API

Access date field is now human-friendly. Also enforcing SQL date form for the field in the DB and discarding bad data passed via setField().

Note: See TracTickets for help on using tickets.