PubMan Func Spec Date Search

=Basic Rules=
 * Functional Specification on advanced search, indexing and search query syntax is specified here: Functional Specification PubMan Search


 * the start date always ...
 * has to be sooner than or
 * has to be equal in time to
 * ... the end date.

=> start date ≤ end date


 * the end date always ...
 * has to be later than or
 * has to be equal in time to
 * the start date.

=> end date ≥ start date


 * when the user is searching for time ranges ...
 * the start date is always the minimum and
 * the end date is always the maximum
 * ... of the time range.

=> start date {minumum} ≤ set of search results ≤ end date {maximum}

=Automatic Serializations= That paragraph describes how date entries which are made by PubMan users should always be handled on technical level.

Start Date

 * if the start date is given in format YYYY
 * it should always be handled as YYYY-01-01


 * if the start date is given in format YYYY-MM
 * it should always be handled as YYYY-MM-01


 * if the start date is given in format YYYY-MM-DD
 * it should always be handled as YYYY-MM-DD

End Date

 * if the end date is given in format YYYY
 * it should always be handled as YYYY-12-31


 * if end date is given in format YYYY-MM
 * it should always be handled as YYYY-MM-31


 * if the end date is given in format YYYY-MM-DD
 * it should always be handled as YYYY-MM-DD

=Date Search Usecases= The date search usecases describe possible combinations of date searches via advanced search in PubMan. For all date search usecases the previously specified automatic serializations are true. The date format of start and end page of course don't have to be always equal - they could be combined, but the rules stay the same.

Status/Schedule
Status: in specification Schedule: R6.1

Trigger

 * the user wants to search for a time range

Actors

 * user (logged in as well as not logged in)

Flow of Events

 * the user enters a date in format YYYY for start date as well as for end date
 * the search result should contain items which comprise dates in format YYYY as well as dates in format YYYY-MM as well as dates in format YYYY-MM-DD

Status/Schedule
Status: in specification Schedule: R6.1

Trigger

 * the user wants to search for a time range

Actors

 * user (logged in as well es not logged in)

Flow of Events

 * the user enters a date in format YYYY-MM for start date as well as for end date
 * the search result should contain items which comprise:
 * dates in format YYYY-MM
 * dates in format YYYY-MM-DD
 * dates in format YYYY for that special cases:
 * if MM of start date = 01 -> the search result should contain all items which comprise dates in format YYYY
 * if MM of start date > 01 -> the search result must not contain items which comprise dates in format YYYY (at least for the respective year of the start date)
 * if MM of end date = 12 -> the search result should contain all items which comprise dates in format YYYY
 * if MM of end date < 12 -> the search result must not contain items which comprise dates in format YYYY (at least for the respective year of the end date)
 * for all searched years between the given start year and the given end year the search result should contain all items which comprise dates in format YYYY as well as dates in format YYYY-MM as well as dates in format YYYY-MM-DD

Status/Schedule
Status: in specification Schedule: R6.1

Trigger

 * the user wants to search for a time range

Actors

 * user (logged in as well es not logged in)

Flow of Events

 * the user enters a date in format YYYY-MM-DD for start date as well as for end date
 * the search result should contain items which comprise:
 * dates in format YYYY-MM-DD
 * dates in format YYYY-MM for that special cases:
 * if DD of start date = 01 -> the search result should contain all items which comprise dates in format YYYY-MM
 * if DD of start date > 01 -> the search result must not contain items which comprise dates in format YYYY-MM (at least for the respective year and month of the start date)
 * if DD of end date = 31 -> the search result should contain all items which comprise dates in format YYYY-DD
 * if MM of end date < 31 -> the search result must not contain items which comprise dates in format YYYY-MM (at least for the respective year and month of the end date)
 * dates in format YYYY for the special cases:
 * see UC_PM_DS_02_Search for dates in format YYYY-MM
 * for all searched years between the given start year and the given end year the search result should contain all items which comprise dates in format YYYY as well as dates in format YYYY-MM as well as dates in format YYYY-MM-DD

Status/Schedule
Status: in specification Schedule: R6.1

Trigger

 * the user wants to search for a specific date

Actors

 * user (logged in as well es not logged in)

Flow of Events

 * the user enters the same date in format YYYY-MM-DD for start date as well as for end date
 * the search result should contain all items which comprise the exact given date

Status/Schedule
Status: in specification Schedule: R6.1

Trigger

 * the user wants to search for publications which have a date in the past until those with recent dates

Actors

 * user (logged in as well es not logged in)

Flow of Events

 * the user enters a date in format YYYY in the start date
 * the search result should contain all stored items which comprise dates in format YYYY as well as dates in format YYYY-MM as well as dates in format YYYY-MM-DD since the date which is given as start date in the query
 * minimum date = YYYY-01-01; maximum = recent date of stored publications

Status/Schedule
Status: in specification Schedule: R6.1

Trigger

 * the user wants to search for publications which have a date in the past until those with recent dates

Actors

 * user (logged in as well es not logged in)

Flow of Events

 * the user enters a date in format YYYY-MM in the start date
 * the search result should contain all stored items which comprise
 * dates in format YYYY-MM
 * dates in format YYYY-MM-DD since the date which is given as start date in the query
 * dates in format YYYY for that special cases:
 * if MM of start date = 01 -> the search result should contain all items which comprise dates in format YYYY
 * if MM of start date > 01 -> the search result must not contain items which comprise dates in format YYYY for the respective year of the start date

Status/Schedule
Status: in specification Schedule: R6.1

Trigger

 * the user wants to search for publications which have a specific date in the past until those with recent dates

Actors

 * user (logged in as well es not logged in)

Flow of Events

 * the user enters a date in format YYYY-MM-DD in the start date
 * the search result should contain all stored items which comprise
 * dates in format YYYY-MM-DD since the date which is given as start date in the query
 * dates in format YYYY-MM for that special cases:
 * if DD of start date = 01 -> the search result should contain all items which comprise dates in format YYYY-MM
 * if DD of start date > 01 -> the search result must not contain items which comprise dates in format YYYY-MM for the respective year and month of the start date
 * dates in format YYYY for the special cases:
 * see UC_PM_DS_06_Search only in start date in format YYYY-MM

=Simple Search=
 * Single date search in format YYYY as well as in format YYYY-MM as well as in format YYYY-MM-DD should be handled the same way as for advanced search.