Hi,
Here's my tuppence,
There are many times when using months eg 16 months from know or 24
months from now, where you want to find out what that month is. The easiest
way is to do a mod by 12
ie
4 % 12 = 4 ie
16 % 12 = 4 ie April
if December was 12 then any multiple of twelve when Mod'ed by twelve would
give
12 %12 = 0 = ???? when what you really wanted to get 12. You could of
course have a very complicated expression to do it but it is far simpler ( and
takes less CPU time) to have December =0
therefore
0 % 12 =0 ie December
12 % 12 = 0 ie December
24 % 12 =0 ie December etc etc etc ...
Thank you for listening
Karl
Milt Epstein wrote:
> On Thu, 25 Nov 1999, Antonio Villafana wrote:
>
> > I'm hoping they had a really really really really good reason for
> > doing that!!!!!...............(0 - 11).
>
> Probably because that's the way it's implemented at the OS level (at
> least for UNIX, and I believe it's part of the C standard), and they
> decided there wasn't any reason to change it.
>
> > Anyway guys and gals thanks for the out-pouring of responses.
>
> Yes, isn't it great that someone asks a totally off-topic question,
> and then we get 50 responses answering the question *to the list*
> instead of just to the sender.
>
> Milt Epstein
> Research Programmer
> Software/Systems Development Group
> Computing and Communications Services Office (CCSO)
> University of Illinois at Urbana-Champaign (UIUC)
> [EMAIL PROTECTED]
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html