HyperCard: Converting 12-Hour Time to 24-Hour (7/92)

This article provides a script that converts 12-hour time to international
24-hour time:

on mouseUp
put msg box into q
if last word of q = "PM" then
repeat with n=1 to (the number of chars of q)
if char n of q = ":" then put "," into char n of q
end repeat
put item 1 of q into z
put z+12 into z
put z into item 1 of q
repeat with n=1 to (the number of chars of q)
if char n of q = "," then put ":" into char n of q
end repeat
end if
put "" into last word of q
put q into msg box
end mouseUp

This article is adapted from the Claris Tech Info database.
Published Date: Feb 19, 2012