Skip to content

Fix date helpers

Erwan Rouchet requested to merge fix-date-helpers into master

Closes #1309 (closed), #1310 (closed)

This adds 67 test cases that cover many edge cases, for example:

  • Representing less than a millisecond
  • Reaching exactly 30 days (the threshold where ago() starts returning absolute dates)
  • Reaching exactly the limit for a unit, or just below it (59.999999 seconds and 60 seconds)
  • Skipping a unit: 1 hour and 1 second, but zero minutes
  • Causing weird floating-point-related issues with a .999999 or a .001

Merge request reports

Loading