Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Days and hours



Sorry, my memory mixed two development software together :(

but... it would be nice to have them ;)

Emile

Mark J. Reed wrote:
On 10/20/05, Emile Schwarz <email@hidden <mailto:email@hidden>> wrote:

    -- b. HH:MM:SS
    set hours of myDate to 11
    set minutes of myDate to 45
    set seconds of myDate to 0



The AppleScript date type has no properties named "hours", "minutes", or "seconds". It has, instead, a single property named time which holds the number of seconds since midnight on the day given by the rest of the properties. You can use the built-in constants minutes (defined as 60) and hours (defined as 60 × 60 = 3600), which I didn't know about until this thread, to assemble a time value legibly:

set time of myDate to 11 * hours + 45 * minutes + 0


PS: in a script I wrote some weeks ago, I started either 70 years ago or last year and add 1 day per "repeat", skipping Sundays or skipping the whole week except Sunday or the seven days a week to generate a long (from around 150 to approx 800) lines without trouble (it tooks me many head shaking on the wall / minutes to wrote it).


What was the goal of that script? I don't quite understand what it did.

--
Mark J. Reed <email@hidden <mailto:email@hidden>>

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

This email sent to email@hidden
References: 
 >Re: Days and hours (From: Emile Schwarz <email@hidden>)
 >Re: Days and hours (From: "Mark J. Reed" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.