Category: Language-Data types
Superclass: Magnitude
My instances represent times of the day. I provide methods for instance creation, methods that access components (hours, minutes, and seconds) of a time value, and a block execution timing facility.

Method category index

basic (UTC) (class)
builtins (class)
clocks (class)
initialization (class)
instance creation (class)
accessing (ANSI for DateAndTimes) (instance)
accessing (non ANSI & for Durations) (instance)
arithmetic (instance)
comparing (instance)

basic (UTC) (class)

midnight
Answer a time representing midnight in Coordinated Universal Time (UTC)

utcNow

Answer a time representing the current time of day in Coordinated Universal Time (UTC)

utcSecondClock

Answer the number of seconds since the midnight of 1/1/1901 (unlike #secondClock, the reference time is here expressed as UTC, that is as Coordinated Universal Time).

top


builtins (class)

primNanosecondClock
Returns the number of milliseconds since midnight.

primSecondClock

Returns the number of seconds to/from 1/1/2000.

timezone

Answer a String associated with the current timezone (either standard or daylight-saving) on this operating system. For example, the answer could be `EST' to indicate Eastern Standard Time; the answer can be empty and can't be assumed to be a three-character code such as `EST'.

timezoneBias

Specifies the current bias, in seconds, for local time translation for the current time. The bias is the difference, in seconds, between Coordinated Universal Time (UTC) and local time; a positive bias indicates that the local timezone is to the east of Greenwich (e.g. Europe, Asia), while a negative bias indicates that it is to the west (e.g. America)

timezoneBias: seconds

Specifies the bias, in seconds, for local time translation for the given second clock value (0 being midnight of 1/1/1901). The bias is the difference, in seconds, between Coordinated Universal Time (UTC) and local time; a positive bias indicates that the local timezone is to the east of Greenwich (e.g. Europe, Asia), while a negative bias indicates that it is to the west (e.g. America)

top


clocks (class)

millisecondClock
Answer the number of milliseconds since startup.

millisecondClockValue

Answer the number of milliseconds since startup

millisecondsPerDay

Answer the number of milliseconds in a day

millisecondsToRun: timedBlock

Answer the number of milliseconds which timedBlock took to run

nanosecondClock

Answer the number of nanoseconds since startup.

nanosecondClockValue

Answer the number of milliseconds since startup

secondClock

Answer the number of seconds since the midnight of 1/1/1901

top


initialization (class)

initialize
Initialize the Time class after the image has been bootstrapped

update: aspect

Private - Initialize the receiver's instance variables

top


instance creation (class)

fromSeconds: secondCount
Answer a Time representing secondCount seconds past midnight

hour: h

Answer a Time that is the given number of hours past midnight

hour: h minute: m second: s

Answer a Time that is the given number of hours, minutes and seconds past midnight

hours: h

Answer a Time that is the given number of hours past midnight

hours: h minutes: m seconds: s

Answer a Time that is the given number of hours, minutes and seconds past midnight

minute: m

Answer a Time that is the given number of minutes past midnight

minutes: m

Answer a Time that is the given number of minutes past midnight

new

Answer a Time representing midnight

now

Answer a time representing the current time of day

readFrom: aStream

Parse an instance of the receiver (hours/minutes/seconds) from aStream

second: s

Answer a Time that is the given number of seconds past midnight

seconds: s

Answer a Time that is the given number of seconds past midnight

top


accessing (ANSI for DateAndTimes) (instance)

hour
Answer the number of hours in the receiver

hour12

Answer the hour in a 12-hour clock

hour24

Answer the hour in a 24-hour clock

minute

Answer the number of minutes in the receiver

second

Answer the number of seconds in the receiver

top


accessing (non ANSI & for Durations) (instance)

asMilliseconds
Not commented.

asNanoseconds

Not commented.

asSeconds

Answer `seconds'.

hours

Answer the number of hours in the receiver

minutes

Answer the number of minutes in the receiver

seconds

Answer the number of seconds in the receiver

top


arithmetic (instance)

addSeconds: timeAmount
Answer a new Time that is timeAmount seconds after the receiver

addTime: timeAmount

Answer a new Time that is timeAmount seconds after the receiver; timeAmount is a Time.

printOn: aStream

Print a representation of the receiver on aStream

subtractTime: timeAmount

Answer a new Time that is timeAmount seconds before the receiver; timeAmount is a Time.

top


comparing (instance)

< aTime
Answer whether the receiver is less than aTime

= aTime

Answer whether the receiver is equal to aTime

hash

Answer an hash value for the receiver

top