jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Save action "Normalize date" truncates an end of a range of dates

Open hisakatha opened this issue 2 years ago • 3 comments

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

Windows 11 21H2 and JabRef 5.7--2022-06-13--d241606

Checked with the latest development build

  • [X] I made a backup of my libraries before testing the latest development version.
  • [X] I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Create a new library (I used the biblatex mode)
  2. Create a new article
  3. Enable "Normalize date" in "Save actions" via library properties
  4. Enter 2000/2010 at Date field using GUI
  5. Save the library

Then, the date is truncated into 2000. If "Normalize date" is disabled (by skipping the step 3), the date is saved as 2000/2010. A range of dates such as 2000/2010 should be saved as it is entered after "Normalize date."

(I'm not good at English, so please feel free to edit this issue.)

Appendix

No response

hisakatha avatar Jun 14 '22 11:06 hisakatha

Correct.

Refs. https://en.wikipedia.org/w/index.php?title=ISO_8601&oldid=1091924200

Time Intervalls A time interval is the intervening time between two time points. The amount of intervening time is expressed by a duration (as described in the previous section). The two time points (start and end) are expressed by either a combined date and time representation or just a date representation.

There are four ways to express a time interval:

Start and end, such as "2007-03-01T13:00:00Z/2008-05-11T15:30:00Z"
Start and duration, such as "2007-03-01T13:00:00Z/P1Y2M10DT2H30M"
Duration and end, such as "P1Y2M10DT2H30M/2008-05-11T15:30:00Z"
Duration only, such as "P1Y2M10DT2H30M", with additional context information
  <start>/<end>
  <start>/<duration>
  <duration>/<end>
  <duration>

Of these, the first three require two values separated by an interval designator which is usually a solidus (more commonly referred to as a forward slash "/"). Section 3.2.6 of ISO 8601-1:2019 notes that "A solidus may be replaced by a double hyphen ["--"] by mutual agreement of the communicating partners", and previous versions used notations like "2000--2002".[39] Use of a double hyphen instead of a solidus allows inclusion in computer filenames;[40] in common operating systems, a solidus is a reserved character and is not allowed in a filename.

For <start>/<end> expressions, if any elements are missing from the end value, they are assumed to be the same as for the start value including the time zone. This feature of the standard allows for concise representations of time intervals. For example, the date of a two-hour meeting including the start and finish times could be simply shown as "2007-12-14T13:30/15:30", where "/15:30" implies "/2007-12-14T15:30" (the same date as the start), or the beginning and end dates of a monthly billing period as "2008-02-15/03-14", where "/03-14" implies "/2008-03-14" (the same year as the start).

If greater precision is desirable to represent the time interval, then more time elements can be added to the representation. An interval denoted "2007-11-13/15" can start at any time on 2007-11-13 and end at any time on 2007-11-15, whereas "2007-11-13T09:00/15T17:00" includes the start and end times. To explicitly include all of the start and end dates, the interval would be represented as "2007-11-13T00:00/16T00:00".

ThiloteE avatar Jun 14 '22 11:06 ThiloteE

For context: This here is a sub-issue of #2753

ThiloteE avatar Jun 17 '22 10:06 ThiloteE