• 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: vdate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vdate


  • Subject: Re: vdate
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 5 Nov 2001 17:21:55 -0800

On Monday, November 5, 2001, at 08:56 AM, Robert Poland wrote:

The following crashes on my wifes 6100, OS 8.1. I tried Applescript 1.1.3.

set DateString to "" & (vDate)'s month & " " & (vDate)'s day & ", " & (vDate)'s year -- month, day, year

Error says it cannot make month "November into a string".

Yep. The month of an AppleScript date object isn't really a string, it's an enumeration, and AppleScript didn't support coercing enumerations to strings prior to 1.4. Since you're using 1.1.3, you'll have to do it the hard way, like this:

if (vDate)'s month is January then
set m to "January"
else if (vDate)'s month is February then
set m to "February"
(etc.)

Alternatively, you could ask for "date string of vDate" and then trim off the day of the week, or you could get one of several more flexible date formatting additions.

I assume that "vdate" is calling an osax, but I can't seem to figure out which one. I searched the Applescript sites and found nothing.

More likely, it's just a variable. Look for a line that says "set vDate to ...".


--Chris Nebel
AppleScript Engineering


  • Follow-Ups:
    • Re: vdate
      • From: Christopher Nebel <email@hidden>
References: 
 >vdate (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: itunes2 and applescript
  • Next by Date: Display Sleep
  • Previous by thread: vdate
  • Next by thread: Re: vdate
  • Index(es):
    • Date
    • Thread