10
$\begingroup$

Bug introduced in 8.0 and fixed in 9.0


According to the documentation when using DateList but not giving it a year it should use the current year. It is not doing that for me. Instead it uses 1900. Evaluating the example in the documentation:

DateList[{"2/15", {"Month", "Day"}}]

results in

{1900, 2, 15, 0, 0, 0.}

when I would expect

{2012, 2, 15, 0, 0, 0.}

Am I reading the documentation wrong, or do I have some setting set wrong somewhere, or is this a bug if some kind?

$\endgroup$
4
  • $\begingroup$ I get the same 1900 result (Mma 8.0.4, Win7) and yes, the documentation does explicitly say that. Interestingly the documentation example of DateList[{"2/15", {"Month", "Day"}}] has an integer zero in the seconds position, instead of 0.. Very odd! I think you might have found a bug. $\endgroup$
    – Verbeia
    Commented Jul 9, 2012 at 22:41
  • $\begingroup$ I guess the problem is only with the DateList[{string, {e1, e2, ...}] input. Others use the current year. For example, DateList["23 Nov"] or even DateList["23/11"], although the latter gives a warning that it is ambiguous $\endgroup$
    – rm -rf
    Commented Jul 9, 2012 at 23:11
  • $\begingroup$ On version 7 under Windows 7 for entry DateList[{"2/15", {"Month", "Day"}}] I get output {2012, 2, 15, 0, 0, 0}. $\endgroup$
    – Mr.Wizard
    Commented Jul 9, 2012 at 23:25
  • $\begingroup$ I get {2012, 2, 15, 0, 0, 0} on "7.0 for Linux x86 (32-bit) (November 11, 2008)" $\endgroup$
    – user1722
    Commented Jul 12, 2012 at 13:56

1 Answer 1

2
$\begingroup$

This seems to be a bug in V8, it works in V7 and now in V9.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.