Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Verbeia Jul 9 '12 at 22:41
    
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 –  rm -rf Jul 9 '12 at 23:11
    
On version 7 under Windows 7 for entry DateList[{"2/15", {"Month", "Day"}}] I get output {2012, 2, 15, 0, 0, 0}. –  Mr.Wizard Jul 9 '12 at 23:25
    
I get {2012, 2, 15, 0, 0, 0} on "7.0 for Linux x86 (32-bit) (November 11, 2008)" –  barrycarter Jul 12 '12 at 13:56

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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