%%s 3/3/77 %%d D 1.3 15-Jun-83 12:57:22 sventek 3 2 %%c Removed trailing periods from quoted strings, as they are no longer needed. %%s 3/3/77 %%d D 1.2 09-Jun-83 12:11:54 sventek 2 1 %%c Converted select references to switch references, as required by the %%c new ratfor specification. %%s 0/0/0 %%d D 1.1 25-Mar-82 12:03:15 v1.1 1 0 %%c Version 1.1 is the Spring 1982 Distribution of the LBL/Hughes release %%c of the Software Tools Virtual Operating System software and documentation. %%T %%I 1 %%D 2 #-h- date.r 1247 asc 25-mar-82 07:32:16 v1.1 (sw-tools v1.1) #-h- main 1174 asc 25-mar-82 07:31:55 v1.1 (sw-tools v1.1) %%E 2 %%I 2 %%D 3 #-h- date.r 1251 asc 09-jun-83 12:10:50 sventek (joseph sventek) #-h- main 1174 asc 09-jun-83 12:08:45 sventek (joseph sventek) %%E 3 %%E 2 %%I 3 #-h- date.r 1250 asc 15-jun-83 12:57:09 sventek (joseph sventek) #-h- main 1173 asc 15-jun-83 12:56:51 sventek (joseph sventek) %%E 3 # print day-of-week, and current date and time DRIVER( date) integer now( 7), day, form integer wkday, getarg, equal character date( 10), time( 9), timzon( 10) string sunday "Sunday" string monday "Monday" string tuesda "Tuesday" string wednes "Wednesday" string thursd "Thursday" string friday "Friday" string saturd "Saturday" string twoblk " " string minusn "-n" %%D 3 call query( "usage: date [-n].") %%E 3 %%I 3 call query( "usage: date [-n]") %%E 3 form = LETTER if( getarg( 1, date, 10) != EOF ) { call fold( date) if( equal( date, minusn) == YES ) form = DIGIT } call getnow( now) call fmtdat( date, time, now, form) day = wkday( now( 2), now( 3), now( 1)) %%D 2 select(day) %%E 2 %%I 2 switch(day) %%E 2 { case 1: call putlin(sunday, STDOUT) case 2: call putlin(monday, STDOUT) case 3: call putlin(tuesda, STDOUT) case 4: call putlin(wednes, STDOUT) case 5: call putlin(thursd, STDOUT) case 6: call putlin(friday, STDOUT) case 7: call putlin(saturd, STDOUT) } call putlin( twoblk, STDOUT) call putlin( date, STDOUT) call putlin( twoblk, STDOUT) call putlin( time, STDOUT) call gtzone( timzon ) if( timzon(1) != EOS ) { call putlin( twoblk, STDOUT) call putlin( timzon, STDOUT) } call putch( '@n', STDOUT) DRETURN end #-h- date.fmt 373 asc 25-mar-82 07:32:18 v1.1 (sw-tools v1.1) .so ~bin/manhdr .hd Date (1) 13-Jun-79 print the date .sy date [-n] .ds The current day of the week, date, time, and time zone are printed in the format: .ti +20 day dd-mmm-yy hh:mm:ss zone .sp 1 if the -n switch is used the date is output in the following format: .ti +20 day mm/dd/yy hh:mm:ss zone .fl none .sa The Unix command 'date' .di none .au Debbie Scherrer .bu %%E 1