home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 5
/
ctrom5b.zip
/
ctrom5b
/
DOS
/
TEKST
/
AURORA2
/
FULLDATE.AML
< prev
next >
Wrap
Text File
|
1995-04-28
|
2KB
|
63 lines
/* ------------------------------------------------------------------ */
/* Macro: FULLDATE.AML */
/* Written by: nuText Systems */
/* */
/* Description: This macro displays the current date and time in */
/* 'full-format', i.e. "2:18pm Saturday, January 7, */
/* 1995", and prompts you to enter it into your text. */
/* */
/* Usage: Select this macro from the Macro List (on the Macro */
/* menu), or run it from the macro picklist <shift f12> */
/* ------------------------------------------------------------------ */
// compile time macros and function definitions
include bootpath "define.aml"
// get date and time in raw format
rawtime = getrawtime
// note: getrawtime returns "YYYYMMDDWhhmmssuu" where:
// YYYY = year // hh = hour (0-23)
// MM = month (1-12) // mm = minutes (0-59)
// DD = day (1-31) // ss = seconds (0-59)
// W = day of week (0=sunday) // uu = hundredths of a sec (0-99)
full_date =
gettime + ' ' +
// get day of the week
case rawtime [9]
when '0' "Sunday" when '4' "Thursday"
when '1' "Monday" when '5' "Friday"
when '2' "Tuesday" when '6' "Saturday"
when '3' "Wednesday"
end
+ ", " +
// get month
case rawtime [5:2]
when "01" "January" when "07" "July"
when "02" "February" when "08" "August"
when "03" "March" when "09" "September"
when "04" "April" when "10" "October"
when "05" "May" when "11" "November"
when "06" "June" when "12" "December"
end
// get day of the month and the year
+ ' ' + rawtime [7:2] + ", " + rawtime [1:4]
if wintype? "edit" then
if (okbox full_date + ": Enter into text?" "Full Date") == "Ok" then
write full_date
end
else
msgbox full_date "Full Date"
end