Subject: | |
From: | |
Reply To: | |
Date: | Tue, 7 Jan 2003 12:42:32 -0600 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Johns post brings to mind a very good point. Having all *NEW*
development to be platform independent is probably a good idea for those
who plan on migrating to UNIX.
Do It In POSIX.
--
Michael Anderson
Spring Independent School District
16717 Ella Boulevard
Houston, Texas 77090-4299
office: 281.586.1105
fax: 281.586.1187
-
>>> "John R. Wolff" <[log in to unmask]> 01/07/03 11:39AM >>>
You can use the POSiX 'date' command which has 3 different ways of
calculating the week number. The options are:
%U --- With Sunday being the 1st day in the week range (00 to
53).
Days before the 1st Sunday are in week 00.
%V --- With Monday as the 1st day in the week range (01 to 53).
This
option requires 4 or more days in the new year to be week 1, otherwise
they
are part of week 53 of the previous year.
%W --- With Monday as the first day in the week range (00 to 53),
similar to %U above.
Example: date +%V
Result: 02
For today, 1-7-2003.
The man page for date can give you much more detail. The date command
has
every conceivable way of displaying date and time related information
--
check it out. You can place the results of the POSiX command into a
variable and make it a regular function in your system.
Hope this helps.
John Wolff
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|