Section 16.2. Numbers


16.2. Numbers

The minutes property and its ilk are intended to help you convert to seconds. This is because date arithmetic uses seconds (see "Date" in Chapter 13 and "Arithmetic Operators" in Chapter 15).

pi

3.14159265359

3.14159265359

The ratio of a circle's circumference to its diameter.

Example

 set area to pi * (radius ^ 2) 

minutes

60

60

The number of seconds in a minute.

Example

 (current date) + 30 * minutes -- half an hour from now 

hours

3600

3600

The number of seconds in an hour.

Example

 (current date) + 2 * hours -- two hours from now 

days

86400

86400

The number of seconds in a day.

Example

 (current date) + 2 * days -- two days from now 

weeks

604800

604800

The number of seconds in a week.

Example

 (current date) + 2 * weeks -- two weeks from now 




AppleScript. The Definitive Guide
AppleScript: The Definitive Guide, 2nd Edition
ISBN: 0596102119
EAN: 2147483647
Year: 2006
Pages: 267
Authors: Matt Neuburg

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net