• 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: Current date in standard additions dictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Current date in standard additions dictionary


  • Subject: Re: Current date in standard additions dictionary
  • From: Michelle Steiner <email@hidden>
  • Date: Mon, 4 Jun 2001 08:35:27 -0700

On 6/3/01 12:20 PM, email@hidden <email@hidden> wrote:

>I was wanting a time_slug to be in 12 hour format. The applescript guide
>gives the following subroutine for a time_slug in the format I want, but it
>is in military time. Does anybody know how to convert to 12 hour format?

set the time_slug to my format_time_using(the (current date), ":", {"H",
"MM"})
set {oldtid, text item delimiters} to {text item delimiters, {":"}}
set hour_to_test to text item 1 of the time_slug as integer
set retained_minutes to text item 2 of the time_slug
set text item delimiters to {""}
set time_slug to time_slug & " AM"
if hour_to_test is greater than 12 then
set hour_to_test to hour_to_test - 12
set time_slug to hour_to_test & ":" & retained_minutes & " PM" as text
end if
time_slug

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Prev by Date: [OFF] Filename encoding on the net
  • Next by Date: Thanks "a reference to"
  • Previous by thread: Re: Current date in standard additions dictionary
  • Next by thread: Avoiding Scientific Notation?
  • Index(es):
    • Date
    • Thread