• 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: Another question on dates and times
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another question on dates and times


  • Subject: Re: Another question on dates and times
  • From: Skeeve <email@hidden>
  • Date: Wed, 05 Dec 2007 09:56:35 +0100

Ron wrote:
This is my standard date and time script I use when generating reports with beginning and end dates.
Oh my god! You like it complicated, don't you? Three times the same code... Why don't you just use a handler?

return {¬
   dash_delimited:(datestring from current date given delimiter:"-"),¬
   none:(datestring from current date without delimiter),¬
   standard_delimited:(datestring from current date with delimiter)}

on datestring from a_date given delimiter:delim
if delim is false then
set delim to ""
else if delim is true then
set delim to "/"
end if
return (text -2 thru -1 of ((100 + (month of a_date) as number) as string)) & delim & ¬
(text -2 thru -1 of ((100 + (day of a_date) as number) as string)) & delim & ¬
(year of a_date)
end datestring



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

This email sent to email@hidden
References: 
 >Re: Another question on dates and times (From: Ron <email@hidden>)

  • Prev by Date: Re: Wow, AppleScript is tough!
  • Next by Date: Re: Another question on dates and times
  • Previous by thread: Re: Another question on dates and times
  • Next by thread: Re: Another question on dates and times
  • Index(es):
    • Date
    • Thread