HP3000-L Archives

January 2007, 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:
Bruce Collins <[log in to unmask]>
Reply To:
Bruce Collins <[log in to unmask]>
Date:
Wed, 3 Jan 2007 13:40:27 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
Reggie Monroe asked:
>Is there a way to calculate the Julian date in MPE?

This command file from http://jazz.external.hp.com/src/scripts/doy.txt might 
give you what you want:
PARM rtnvar=""
# Converts "today" to the day of the year. Handles leap years. If "rtnvar" 
is
# passed the DOY is returned in this var, else it is  written to $stdlist.
setvar _doy hpdate + &
       ![WORD("0 31 59 90 120 151 181 212 243 273 304 334",,hpmonth)]
if hpyyyy mod 4 = 0 and (hpyyyy mod 100 <> 0 or hpyyyy mod 400 = 0) and &
   hpmonth >= 3 then
   setvar _doy _doy + 1
endif
if "!rtnvar" = "" then
   echo Day of Year for !hpdatef is: !_doy
else
   setvar !rtnvar _doy
endif
deletevar _doy
Bruce 

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2