[Index for tmp_for_tar/vrml.doc] [Return to Master Index]

datestr

(tmp_for_tar/vrml.doc/datestr.m)


Function Synopsis

s=datestr(CLK)

Help text

USAGE  s = datestr( {CLOCK=void} )

NOARGS more or less the same as m****b's datestr(now)
CLOCK  six  elements numerical vector, formatted as a
       timestamp given by octave's 'clock()'-function

        Rolf Fabian             <fabian@tu-cottbus.de>
        last modification        July 18, 2000
EXA     datestr([999,5:9]) |-   06-May-0999 07:08:09

 Last modified: December 2000



Listing of function file tmp_for_tar/vrml.doc/datestr.m

##USAGE  s = datestr( {CLOCK=void} )
##
##NOARGS more or less the same as m****b's datestr(now)
##CLOCK  six  elements numerical vector, formatted as a
##       timestamp given by octave's 'clock()'-function
##
##AUTHORS Etienne Grossmann      <etienne@isr.ist.utl.pt>
##        Rolf Fabian             <fabian@tu-cottbus.de>
##        last modification        July 18, 2000
##EXA     datestr([999,5:9]) |-   06-May-0999 07:08:09


## Author:        Etienne Grossmann  <etienne@isr.ist.utl.pt>
## Last modified: December 2000

function s=datestr(CLK)

  mname   = ["Jan";"Feb";"Mar";"Apr";"May";"Jun";...
             "Jul";"Aug";"Sep";"Oct";"Nov";"Dec"];
  
  if      ! nargin, s=clock ();
  elseif  ! isstr(CLK) & (size(CLK)==[1,6]) s=CLK;
  else    error("CLK must be formatted like a 'clock()' output vector");
  end
  
  s = sprintf ("%02d-%3s-%04d %02d:%02d:%02d",...
               s(3), mname(s(2),:), s([1,4,5]), round(s(6)));
  

Produced by oct2html on Sat Dec 2 19:08:39 2000
Cross-Directory links are: ON