Issue 13980

Summary: Function - days in month
Product: Calc Reporter: rjbutler <russell>
Component: codeAssignee: daniel.rentz
Status: CLOSED NOT_AN_OOO_ISSUE QA Contact: issues@sc <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 1.1 Beta   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description rjbutler 2003-05-01 02:11:29 UTC
The function "daysinmonth()" seems to return a result of 31 whatever value is
inserted in the brackets. Not good when one wants to evaluate February or June
entries.
Comment 1 frank 2003-05-05 10:46:08 UTC
Hi Daniel,

at least the result field in the function autopilot displays 31 if you
enter the date value 02/02/03. If you use a dot as separator, this
works as expected.

Frank
Comment 2 daniel.rentz 2003-05-05 10:53:29 UTC
As I remember, this has been discussed several times before... ;-)

02/02/03 is (and will be in the future) 2 divided by 2 divided by 3,
which results in 0, which is interpreted as 1.1.1900, which results in
31 days using the DAYSINMONTH function.

To be locale independent, just use the DATE function:
DAYSINDATE( DATE( 2003; 2; 2 ) )
Comment 3 daniel.rentz 2003-05-05 10:53:43 UTC
invalid->closed
Comment 4 frank 2003-05-05 11:01:56 UTC
Hi Daniel,

thanks for clarification.

Frank
Comment 5 rjbutler 2003-05-05 11:52:55 UTC
Sorry to have raised a red herring, but  I did try to find an issue
reagrding this. Perhaps the trap could be pointed out more explicitly
in the help files.

Russell