• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: New date bug [Re: Correcting AGE_INFO]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New date bug [Re: Correcting AGE_INFO]


  • Subject: Re: New date bug [Re: Correcting AGE_INFO]
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 5 Feb 2010 06:29:30 -0700

On Feb 5, 2010, at 6:04 AM, Mark J. Reed wrote:

The difference is that centennial years not divisible by 400 are not leap years in the new system - so 1900 wasn't a leap year, and 2100 won't be, either. 

I had to take all those exceptions into account when I wrote a calendar program (all it did was print them; it was not an appointment or event calendar) for the Apple II and for Microsoft BASIC for the Mac.

The code for that line in MS BASIC was
DM(2) =DM(2) -(YEAR/4 =INT(YEAR/4)) +(YEAR/100= INT(YEAR/100)) -(YEAR/400= INT(YEAR/400))
"DM" stood for "Days in Month", and the "(2)" was obviously for the second month (February).

You can see the MS BASIC source code for the entire program at

http://www.mactech.com/articles/mactech/Vol.01/01.02/KnowingDate/index.html

http://macte.ch/CFL3H

-- Michelle

--
Forget world peace.
Visualize using
your turn signal!

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: New date bug [Re: Correcting AGE_INFO]
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Re: Correcting AGE_INFO (From: "Nigel Garvey" <email@hidden>)
 >New date bug [Re: Correcting AGE_INFO] (From: "Nigel Garvey" <email@hidden>)
 >Re: New date bug [Re: Correcting AGE_INFO] (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: New date bug [Re: Correcting AGE_INFO]
  • Next by Date: Re: New date bug [Re: Correcting AGE_INFO]
  • Previous by thread: Re: New date bug [Re: Correcting AGE_INFO]
  • Next by thread: Re: New date bug [Re: Correcting AGE_INFO]
  • Index(es):
    • Date
    • Thread