Re: Human Readable Time snipit
Re: Human Readable Time snipit
- Subject: Re: Human Readable Time snipit
- From: kai <email@hidden>
- Date: Thu, 12 Oct 2006 01:31:57 +0100
On 11 Oct 2006, at 23:51, Nir Soffer wrote:
Here is a shorter, simpler and more readable version:
You could probably also indulge in a little date tomfoolery to
achieve something similar. Makes it a bit shorter still (though no
claims here about readability...) ;-)
Usual caution about line wraps.
--------------
on dhms_format from s
tell ((date ("1 " & "1")) + (s * s) ^ 0.5) to tell (1000000 + (its
hours) * 10000 + (its minutes) * 100 + (its seconds)) as string to (s
div days as string) & ":" & text 2 thru 3 & ":" & text 4 thru 5 & ":"
& text 6 thru 7
end dhms_format
dhms_format from 5.86574625E+8
--> "6789:01:23:45"
--------------
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden