We don't need to create an object for the Class Date. We can use Date like prefix.
dateAndTimeNow
Returns an array whose first element is today and second element is the time. You can read an array element using "at:"
Example
arrDT:= Date dateAndTimeNow. D:=arrDT at:1. T:=arrDT at:2. Transcript show:D. Transcript show:'------'. Transcript show:T.
Result
15 November 2009------1:51:41 pm
today
Example
D:= Date today. Transcript show:D.
Result
15 November 2009
today weekday
Example
wD:= Date today weekday. Transcript show:wD.
Result
Monday
today julianDayNumber
Number of days (or part of a day) elapsed since noon GMT on January 1st, 4713 B.C.
Example
jD:= Date today julianDayNumber. Transcript show:jD.
Result
2453325
today monthIndex
Example
mI:= Date today monthIndex. Transcript show:mI.
Result
11
today weekdayIndex
today monthName
today year
today addDays:n
Date that is n days after today
Example
nD:= Date today addDays:2. Transcript show:nD.
Result
17 November 2009
today subtractDays:n
today asGregorian.
Return an array of integers #(dd mm yyyy). You can read an array element using "at:"
Example
gD:= Date today asGregorian. dG:=gD at:1. Transcript show:dG
Result
15
today asSeconds.
Seconds between 1 January 1901 and the NOW. Useful in creation of timers. Reading the values in 2 moments you can know the interval in seconds.
Example
sN:= Date today asSeconds. Transcript show:sN
Result
3277929600
today mmddyyy
The usual format:mm/dd/yyyy.
Example
mDY:= Date today mmddyyyy. Transcript show:mDY
Result
11/15/2009
We don't need to create an object for the Class Time. We can use Time like prefix.
now
Example
|nN| nN:= Time now . Transcript show:nN
Result
3:13:09 pm
now hours
Example
nH:= Time now hours . Transcript show:nH
Result
15
now minutes
now seconds
PREVIOUS LESSON NEXT LESSON TABLE OF CONTENTS HOMEPAGE