• 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: Newbie: Coercing Month of date class to a number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: Coercing Month of date class to a number


  • Subject: Re: Newbie: Coercing Month of date class to a number
  • From: JJ <email@hidden>
  • Date: Wed, 20 Feb 2002 23:00:21 +0100

> Is there an easier way of doing this directly using "current date", or is
> this the only way of doing it, or should I use a repeat loop?

This old subroutine returns the "numeric" month:

set current_date to (current date)
set first_month to current_date
set month of first_month to January
(1 + (current_date - first_month + 1314864) div 2629728)

--> 2 (only in February :-)

JJ
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: PhotoScripter and Trim
  • Next by Date: Type F10 as a user
  • Previous by thread: Newbie: Coercing Month of date class to a number
  • Next by thread: Re: Newbie: Coercing Month of date class to a number
  • Index(es):
    • Date
    • Thread