Re: Another question on dates and times
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