%%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 #-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) # 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" call query( "usage: date [-n].") 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)) select(day) { 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