2
$\begingroup$
{PreviousDate[{2017, 1, 1, 0, 0, 0}, "Second"], 
 NextDate[{2016, 12, 31, 23, 59, 59}, "Second"]}

2016 had an extra leap second. The last second of 2016 was not 23:59:59, but 23:59:60.

$\endgroup$
  • 3
    $\begingroup$ From a technical perspective it's somewhat nontrivial to perform queries on leap seconds: they are usually known only roughly six months in advance, and the results for such queries would change as time passes. Leap seconds are a mess, and it's reasonably easy to argue that the result of the following calculation is both correct and incorrect at the same time: Mod[DateDifference["1990", "2010", "Seconds"], Quantity[60, "Seconds"]] (the Mma result is 0, ignoring leap seconds). $\endgroup$ – kirma Sep 24 at 18:22
  • 2
    $\begingroup$ I completely agree with you. So shouldn't this be included in the help browser documentation? The Details and Options section is pretty short for these two pages, why is there no comment like "... ignores leap seconds"? $\endgroup$ – Andreas Lauschke Sep 24 at 18:30
  • $\begingroup$ This should be mentioned on basically every page of documentation somehow involving intervals of time combined with specific "wall clock" moments of time. Maybe worth a documentation bug report? $\endgroup$ – kirma Sep 24 at 18:35
  • $\begingroup$ completely agree with you. Yes, please file a documentation bug report. $\endgroup$ – Andreas Lauschke Sep 24 at 18:38
  • 1
    $\begingroup$ Uh-oh. Maybe I should, although anybody with access to Mma should be able to do it! $\endgroup$ – kirma Sep 24 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.