Issue 13980 - Function - days in month
Summary: Function - days in month
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: daniel.rentz
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-01 02:11 UTC by rjbutler
Modified: 2003-09-08 16:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
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