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

 
 

bug #30708: DATESUM, DATEDIFF clarifications

Submitted by:  Ben Pfaff <blp>
Submitted on:  Sun 08 Aug 2010 11:11:18 PM UTC  
 
Category: Numerical ErrorsSeverity: 5 - Average
Status: FixedAssigned to: None
Open/Closed: ClosedRelease: Before 0.8.0
Effort: 0.00

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #21172:  date_stuff_for_SPSS.SPS added by blp (1kB - 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
  • -unavailable- added by blp (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 25 Nov 2012 06:33:15 PM UTCblpStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sat 14 May 2011 04:42:51 AM UTCblpReleaseNone=>Before 0.8.0
    Sun 08 Aug 2010 11:11:18 PM UTCblpAttached 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.1-cleanup