Home THE HYPERCARD CENTER

HyperTalk Reference
Home » HyperTalk Reference » Functions

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

time

the [adjective ] time time() Value returned: A text string representing the current time set in your Macintosh, in one of the following time formats:
the time           -- 9:14 AM
time()             -- 9:14 AM
the abbrev time    -- 9:14 AM
the short time     -- 9:14 AM
the long time      -- 9:14:42 AM
the English time   -- 9:14:42 AM


When HyperCard is running under System 7.1, the long, abbrev, and short forms agree with the formats set in the Date & Time Control Panel.

The form the English time returns the time in the form hh :mm :ss: AM|PM no matter what language the system is localized for and no matter what the settings are on the Date & Time Control Panel.


Demo Script

on clock
  show bkgnd field "Demo Field" 
  put the ticks into startTicks
  put the seconds into startSeconds
  repeat until the mouseClick
    displayMessage "The time is" && the time & return & ¬
    "The long time is" && the long time & return & return &¬
    the seconds - startseconds && "seconds have elapsed." & return & ¬
    the ticks - startTicks && "ticks have elapsed." & return & return &¬
    spaces(20) & "Click the mouse to continue . . ."
  end repeat
  hide bkgnd field "Demo Field"
end clock

Placeholders

Related Topics

« ticks | HyperTalk Reference | tool »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View

Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » Functions

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

time

the [adjective ] time time() Value returned: A text string representing the current time set in your Macintosh, in one of the following time formats:
the time           -- 9:14 AM
time()             -- 9:14 AM
the abbrev time    -- 9:14 AM
the short time     -- 9:14 AM
the long time      -- 9:14:42 AM
the English time   -- 9:14:42 AM


When HyperCard is running under System 7.1, the long, abbrev, and short forms agree with the formats set in the Date & Time Control Panel.

The form the English time returns the time in the form hh :mm :ss: AM|PM no matter what language the system is localized for and no matter what the settings are on the Date & Time Control Panel.


Demo Script

on clock
  show bkgnd field "Demo Field" 
  put the ticks into startTicks
  put the seconds into startSeconds
  repeat until the mouseClick
    displayMessage "The time is" && the time & return & ¬
    "The long time is" && the long time & return & return &¬
    the seconds - startseconds && "seconds have elapsed." & return & ¬
    the ticks - startTicks && "ticks have elapsed." & return & return &¬
    spaces(20) & "Click the mouse to continue . . ."
  end repeat
  hide bkgnd field "Demo Field"
end clock

Placeholders

Related Topics

« ticks | HyperTalk Reference | tool »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View