Re: date from yesterday

From: Bob Stockler (bob_at_trebor.iglou.com)
Date: 09/17/03


Date: Wed, 17 Sep 2003 19:03:23 GMT
To: SCO Miscellaneous <scomsc@xenitec.on.ca>

On Wed, Sep 17, 2003 at 12:11:50PM -0400, Jean-Pierre Radley wrote:
| Bill Vermillion typed (on Wed, Sep 17, 2003 at 03:57:01PM +0000):
| | Or if somone is ambitious they can take one of the OpenSource
| | versions of date that uses the -v flag.
| |
| | Then you can use any of the y,m,w,d,h,m with a +N or -N where N is
| | an integer and used in the form of -v-3d for 3 days in the past to
| | adjust units, but without the -/+ preceding the unit it gives the
| | numeric unit equivalent, so you can specify any date in the Unix
| | range. It will work from approximately 1902 thru February 18th 2038.
| |
| | >From the example:
| | date -v1d -v3m -v0y -v-1d
| | Sets the day to the first, the month to March, the year to 2000,
| | and then moves back 1 day.
| |
| | Make EOM calculations easy.
| |
| | This is from the BSD sources and may take a bit of diddling for the
| | SysV arena but it surely makes things handy.
|
| Simpler solution: use Bob Stockler's awk scripts.
|
| ftp.jpr.com:/pub/datemath.tgz

And it works for all years from 0001 through 9999.

Users in countries that didn't switch from the Julian
to the Gregorian calendar when the USA did will have
to edit it to account for days lost when the switch
was made. As written, the program skips the days
between 09/02/1752 and 09/14/1752.

-- 
Bob Stockler - bob@trebor.iglou.com
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).


Relevant Pages

  • Re: CreateFile() and FILE_FLAG_WRITE_THROUGH
    ... BUT this will not work UNLESS you specify the ... FILE_FLAG_NO_BUFFERING flag, ... I have now proved to myself that file metadata is not written ... disk structure to be consistent, this incurs a cost and that's why the ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Letting a user select a color for a control
    ... CC_FULLOPEN flag instead of the CC_SOLIDCOLOR flag in order to do this. ... is there any way to specify where on the screen the Color Dialog ... > specify an initial color selection. ... >> something before calling aDialogColor. ...
    (microsoft.public.access.modulesdaovba)
  • Re: ping problem
    ... Hi adonis, I should have asked you to being with, are you using server 2000 ... which lets you specify a source address. ... There is also a switch for ipv4 ... i want to ping a client, from a server with one of my NICs. ...
    (microsoft.public.windows.server.general)
  • Re: Using the /norestart switch
    ... > I am using SMS 2003 to deploy patches to Windows XP and Windows 2000 ... > Even I specify the /norestart switch, the clients are rebooting. ...
    (microsoft.public.sms.admin)
  • Re: Problem with fopen, linux, and RS-232, possibly
    ... Are those pins you specified the DCD signal? ... you may want the O_NOCTTY flag to be present. ... Try writing the program using openinstead, and specify the exact ... may be unaware of its "readiness", then any opencall may not block. ...
    (comp.lang.c)