annotate scripts/time/ctime.m @ 1183:8d45d63ecbc8

[project @ 1995-03-30 04:50:34 by jwe] Initial revision
author jwe
date Thu, 30 Mar 1995 04:50:34 +0000
parents
children 611d403c7f3d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1183
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
1 # Copyright (C) 1995 John W. Eaton
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
2 #
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
3 # This file is part of Octave.
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
4 #
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
5 # Octave is free software; you can redistribute it and/or modify it
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
6 # under the terms of the GNU General Public License as published by the
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
7 # Free Software Foundation; either version 2, or (at your option) any
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
8 # later version.
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
9 #
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
10 # Octave is distributed in the hope that it will be useful, but WITHOUT
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
13 # for more details.
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
14 #
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
15 # You should have received a copy of the GNU General Public License
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
16 # along with Octave; see the file COPYING. If not, write to the Free
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
17 # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
18
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
19 function retval = ctime (t)
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
20
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
21 # usage: ctime (TMSTRUCT)
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
22
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
23 if (nargin == 1)
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
24 retval = asctime (localtime (t));
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
25 else
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
26 usage ("ctime (TMSTRUCT)");
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
27 endif
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
28
8d45d63ecbc8 [project @ 1995-03-30 04:50:34 by jwe]
jwe
parents:
diff changeset
29 endfunction