home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
dosutils
/
env18a.arj
/
DATE.ENV
< prev
next >
Wrap
Text File
|
1992-04-23
|
2KB
|
60 lines
list comspec ┌───────────────────────────────────────────────────────────────────┐
list comspec │ ENV v1.7z - The Master Environment Utility - Copr. K.Eikland 1992 │
list comspec ├───────────────────────────────────────────────────────────────────┤
list comspec │ ENV is a Shareware program, which means you may freely try out │
list comspec │ its capabilities on your computer for a limited period of time. │
list comspec │ If you find - as I think you will - that you make use of ENV │
list comspec │ and wish to become an authorized user, please follow the │
list comspec │ instructions in the ORDERENV.TXT file. │
list comspec │ │
list comspec │ User feedback welcome! CIS 72461,556 │
list comspec └───────────────────────────────────────────────────────────────────┘
list comspec . Here's an example of ENV's mathematical and date/time capabilities
list comspec .
set time=int(100*timenow())/100
calc time
list time The current time is {get*value}
erase time
set year=int(datenow())
calc year
set monthn=January,February,March,April,May,June,July,August,September,October,November,December
calc month=monthn(int(100*(datenow()-%year%)))
set year=roman(%year%)
calc year
set day=round(100*frac(100*datenow()))
calc day
list comspec The current date is %day% %month% in the year %year%
erase day
erase month*
erase year
set dayn=int((days(datenow())+5){MOD}7+0.1)
calc dayn
set dayn=%dayn%+7*(%dayn%{EQ}0)
calc dayn
list dayn The week's day number is {get*value}
set day1=Monday
set day2=Tuesday
set day3=Wednesday
set day4=Thursday
set day5=Friday
set day6=Saturday
set day7=Sunday
set% dayn=day%dayn%
list dayn The weekday is a {get*value}
erase day?
set dayone=days(int(datenow())+0.0101)
calc dayone
set weekone=(int((%dayone%+5){MOD}7+0.1)){GT}3
calc weekone
set week=(days(datenow())-%dayone%){DIV}7+%weekone%+1
calc week
list week This is Week {get*value}
erase dayone
erase weekone
erase week