bugPSPP - Bugs: bug #30708, DATESUM, DATEDIFF clarifications

 
 

bug #30708: DATESUM, DATEDIFF clarifications

Submitter:  Ben Pfaff <blp>
Submitted:  Sun 08 Aug 2010 11:11:18 PM UTC
   
 
Category:  Numerical Errors Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  Before 0.8.0
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 25 Nov 2012 06:33:15 PM UTC, comment #1: 

PSPP already implemented DATESUM and DATEDIFF as specified in the description, but tests were lacking, so I pushed a commit that adds tests to check for these properties.

Ben Pfaff <blp>
Group administrator
Sun 08 Aug 2010 11:11:18 PM UTC, original submission:  

From: "Daniel E WILLIAMS" <Daniel.E.Williams@state.or.us>

> The time of day appears to count for DATEDIFF.  The difference in years
> between 1 Jan 2004
> at 2pm and 1 Jan 2005 at 1pm equals zero, while the difference in years
> between 1 Jan 2004
> at 2pm and 1 Jan 2005 at 3pm equals one.

> Time of day also appears to count for DATESUM.  1 Feb at 14:00, with one month
> added, becomes 1 Mar at 14:00.  The code I sent tries three different versions
> of DATESUM; the default, "rollover", and "closest" methods.  I cannot figure
> out what the difference between "rollover" and "closest", but I know that
> "closest" is the default.

> You are right.  The SPSS documentation is not very clear on this issue.  I've
> attached code and an output file that shows the calculations I made.  Thanks.


Ben Pfaff <blp>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #21172:  date_stuff_for_SPSS.SPS added by blp (1KiB - application/octet-stream)
file #21173:  date_stuff_for_SPSS.sav added by blp (871B - application/x-spss-sav)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-11-25 blp StatusNone Fixed
        Open/ClosedOpen Closed
    2011-05-14 blp ReleaseNone Before 0.8.0
    2010-08-08 blp Attached File- Added date_stuff_for_SPSS.SPS, #21172
        Attached File- Added date_stuff_for_SPSS.sav, #21173

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code