[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-admin
Subject:    [HPADM] Re: [SUMMARY] date command help
From:       RREALSEN () onlinecp ! com
Date:       1997-09-30 22:46:59
[Download RAW message or body]

Thanks to all who responded so quickly.  It seems I'm not the only one with users who \
want to work during the crucial month-end processing.  

Many thans to:
Tom Coates
Dean Eich - who gave me a copy of a long script that I have yet to  try
and especially . . 
Stephen Hearn
Randy Groebner
Chris Vann

who all suggested the TZ command.  Stephen sent this little script:

if [ $(sh -c "TZ=$(date +%Z)-24; export TZ; date '+%d'") -eq 1 ] 

which changes the timezone so that the date comand will actually return the date of a \
country on the other side of the date line therby giving me an answer of 1 which \
would be the first day of next month.  Anytime this occurred, then today in MY \
timezone would be the last day of the month.  This will only work for those that have \
a timezon 1 day AHEAD not behind.

Thanks again for all of the help.


Sincerely,

Roger D. Realsen
OnLine Connecting Point
Sr. Systems Analyst
8 Autry
Irvine, CA  92618
PH-(714) 472-9000 x 411
FX(714) 472-8600
WEB:   http://www.onlinecp.com
EMAIL:   rrealsen@onlinecp.com
                      a.k.a.
               trendgod@onlinecp.com

> > > <RREALSEN@onlinecp.com> 09/30 8:47 AM >>>
OK here's an easy one I can't seem to find:

Is there a format in the date cammand to return wether the current date is the last \
day of the month or not?

So far the only option I can come up with is:

date +%j

This returns a numerical value for the day of the year [001 - 366].  Then I could \
write an if . . then clause.  I was wondering if anyone knew of another way.

TIA.

Sincerely,

Roger D. Realsen
OnLine Connecting Point
Sr. Systems Analyst
8 Autry
Irvine, CA  92618
PH-(714) 472-9000 x 411
FX(714) 472-8600
WEB:   http://www.onlinecp.com 
EMAIL:   rrealsen@onlinecp.com 
                      a.k.a.
               trendgod@onlinecp.com 
 

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@cv.ruu.nl 
  Name: hpux-admin@cv.ruu.nl                 Owner: owner-hpux-admin@cv.ruu.nl 
 
 Archive:     ftp.cv.ruu.nl/pub/digests/hpux-admin       (FTP, browse only):
   *NEW*:     http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)

                                                                                      \
                !
                                                                                      \
!  

                                                                                      \
!  

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@cv.ruu.nl
  Name: hpux-admin@cv.ruu.nl                 Owner: owner-hpux-admin@cv.ruu.nl
 
 Archive:     ftp.cv.ruu.nl/pub/digests/hpux-admin       (FTP, browse only):
   *NEW*:     http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic