Convert seconds to compound duration: Difference between revisions
Content added Content deleted
Line 186: | Line 186: | ||
{{Trans|JavaScript}} |
{{Trans|JavaScript}} |
||
<lang AppleScript> |
<lang AppleScript>on run |
||
on run |
|||
intercalate(linefeed, ¬ |
intercalate(linefeed, ¬ |
||
map(test, ¬ |
map(test, ¬ |
||
Line 199: | Line 198: | ||
-- DURATION STRINGS |
|||
-- angloDuration :: Int -> String |
-- angloDuration :: Int -> String |
||
Line 205: | Line 206: | ||
on formatted(a, lstPair) |
on formatted(a, lstPair) |
||
set q to item 1 of lstPair |
set q to item 1 of lstPair |
||
if q > 0 then |
if q > 0 then |
||
{(q as string) & space & item 2 of lstPair} & a |
{(q as string) & space & item 2 of lstPair} & a |
||
Line 224: | Line 224: | ||
on weekParts(intSeconds) |
on weekParts(intSeconds) |
||
script mf |
script mf |
||
-- partList Record |
-- partList Record -> Int -> Record |
||
on partList(a, x |
on partList(a, x) |
||
set intRest to remaining of a |
set intRest to remaining of a |
||