#431: WebSearch: fix test case searching by date 1976-04-01 and t dog
------------------------+----------------------
  Reporter:  simko      |      Owner:  valkyrie
      Type:  defect     |     Status:  assigned
  Priority:  major      |  Milestone:  v1.0
 Component:  WebSearch  |    Version:
Resolution:             |   Keywords:
------------------------+----------------------

Comment (by jblayloc):

 No, I think I've failed to be clear.  dateutil ''must'' emit a day number.
 It's a very thin wrapper for Python datetime.datetime objects, which may
 not have value 0.  So far as I can tell, our options are:
 1. write our own dateutil that emits day 00 or similar
 2. find some other library that can parse a wide variety of input date and
 time formats smartly and plug it in in place of dateutil
 3. Accept only ISO-style dates everywhere (extended with today/yetserday
 and datemath)
 4. ''maybe'' we can write a bunch of hacks on top of dateutil to see if a
 day was sent in, and if not strip the 01 from the generated ISO-8601
 format string we generate.

 '''3''' is the easiest.  But '''2''' would probably be best overall.  A
 good candidate for a first place to look is
 http://www.egenix.com/products/python/mxBase/mxDateTime/ .  Its license
 looks like a minor BSD variant, except that it has a clause asserting
 German jurisdiction.  When the CNRI license had a similar provision
 specifying Virginia, the FSF declared it GPL Incompatible.  So probably
 the egenix distribution is GPL incompatible (which is probably why I went
 with dateutil).  If we avoid modifying or redistributing mxDateTime,
 though, this should be a non-issue.  If their parsers and API are
 reasonable, we can safely use them.

-- 
Ticket URL: <https://invenio-software.org/ticket/431#comment:6>
Invenio <http://invenio-software.org>

Reply via email to