HP3000-L Archives

October 1998, Week 4

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:
"Michael P. Smith" <[log in to unmask]>
Reply To:
Michael P. Smith
Date:
Fri, 23 Oct 1998 16:23:27 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
Jeff Vance wrote in message ...
>On Oct 23,  3:31pm, Therm-O-Link wrote:
>Is there an easy way to determine if today is the last day of the
>> current month?
>
>In the CI you can write a simple script such as:
>
># Determine if "today" is the last day of the month.
>if hpmonth = 2 and hpdate = 29 or &
>   "!hpdate" = word("31,28,31,30,31,30,31,31,30,31,30,31",,hpmonth) then
>   # last day of leap year Feb or last day of any month
>   echo Today (!hpdate) is the last day of ![word(hpdatef,,2)]
>endif
>

Ummm...

  Excuse me for being dense, but what happens with this command file if it
is called on February 28th in a year with a leap day?  Wouldn't it say that
it was the last day of the month even though it wasn't?

 ---------------------------------------------------------------
| Michael P. Smith                                              |
| Sr. Systems Programmer                                        |
| The Hertz Corporation    [log in to unmask] (work)          |
| Oklahoma City, OK        [log in to unmask] (personal)      |
 ---------------------------------------------------------------
The thoughts, views and expressions contained in this message are those
of Michael P. Smith, and do not necessarily reflect those of the Hertz
Corporation.  To reply via email, remove the .xx from email address.

>
>
>Regards,
>Jeff Vance, CSY
>
>--
>

ATOM RSS1 RSS2