HP3000-L Archives

January 2003, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"John R. Wolff" <[log in to unmask]>
Reply To:
John R. Wolff
Date:
Tue, 7 Jan 2003 12:39:39 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
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 *

ATOM RSS1 RSS2