HP3000-L Archives

February 2006, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tracy Pierce <[log in to unmask]>
Reply To:
Tracy Pierce <[log in to unmask]>
Date:
Fri, 10 Feb 2006 07:36:22 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (107 lines)
standards are standards, not inviolable rules.  Walter refers to the
standard way in which periods of time expressed in years months days are
described.  re your specific examples of maximums, it's "non-standard"
to mention "1 year 12 months 31 days" though it's exactly as accurate as
"25 months" oops "2 years 1 month".

I see nothing intrinsically invalid about 
"fifteen hundred" vs "one thousand five hundred"
nor
"one year one month one day" vs "13 months one day"
nore
"one day 12 hours 30 minutes" vs "36 hours 30 minutes" 
nor even
"twenty-one" vs "eleventeen" ;-)

and doing arithmetic vs these multi-unit values works exactly the same
as does good old base 10, in which mere position is sufficient to name
the elements "hundreds, tens, units" (nicely consistent units, great
idea;-).  

Next time somebody says "90 minutes", you can tell them they're
non-compliant with ISO 8601. 


* * * * *

re the compiler's arithmetic interim-result behavior, I'll gladly defer
to Walter's expertise: use caution, trust no one.  

But for HP Cobol, it's my understanding and experience that intermediate
results are never kept to any greater precision than any of the operands
is capable of storing.  But I'd be hard pressed to find that accurately
and clearly documented, despite an attempt made in the Cobol II/XL
manual under COMPUTE.


Tracy Pierce

 

> -----Original Message-----
> From: HP-3000 Systems Discussion 
> [mailto:[log in to unmask]] On Behalf Of Bob Comeau
> Sent: Friday, February 10, 2006 4:44 AM
> To: [log in to unmask]
> Subject: Re: HP COBOL routine to calculate the difference 
> between 2 dates
> 
> I think its just that any instance of 31 days would be 
> translated in to a
> month, so it would not be valid in a years/months/days 
> difference value.
> 
> Some instances of 28,29, and 30 would also be invalid at 
> certain points you
> would think.  That is part of the confusion in trying to 
> arrive at such a
> value.
> 
> Bob Comeau
> Sr. Systems Programmer Analyst
> Crossley Carpet Mills Ltd.
> (902)895-5491 ex 139
> 
> 
> -----Original Message-----
> From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On
> Behalf Of Matthew Perdue
> Sent: February 10, 2006 4:38 AM
> To: [log in to unmask]
> Subject: Re: HP COBOL routine to calculate the difference between 2
> dates
> 
> 
> Quoting Walter Murray <[log in to unmask]>:
> 
> > In an earlier posting, I wondered aloud whether there were 
> a rigorous
> > definition of the difference between two dates, in years, 
> months, and
> > days.
> >
> > I did check ISO 8601, which is a standard for date 
> representation.  It
> > did state one requirement to be met when expressing a time period in
> > years, months, and days:  months must not be greater than 
> 11, and days
> > must not be greater than 30.  That's all I could find.
> >
> > Walter
> 
> Huh? Have I missed something here or did December and any 
> months with 31
> days
> just  cease to be able to be represented digitally according 
> to ISA 8601?
> 
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
> 
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
> 

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2