[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: U2 frame DAYS
- Subject: Re: U2 frame DAYS
- From: Harry Binswanger hb@xxxxxxxx
- Date: Sat, 15 Jan 2011 15:44:59 -0500
Wonderful! I decoded it and substituted it in the U2 for the
old JDN2Date.
Reply to note from Harry Binswanger
Sat, 15 Jan
2011 11:15:53 -0500
> Is there a simple way to get the output of DAYS to have the
> form mm/dd/yyyy instead of what it does have, which is single
> digits for output day and month.
Frame DAYS has a lot of moving parts. This mod to frame JDN2Date*
may help:
XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5JDN2Date*}} Julian Day Number to Date [CLD Rev.3/18/01,1/
15/11][cr|lf]{002}{<}SX50,{<}VA@50{>}{>}{<}IF{<}VA{021}50{>}<
1{>}{<}EX{>}{<}EI{>}{<}SX51,{<}PV50{>}+32044{>}{<}SX52,@int((
4*{<}PV51{>}+3)/146097){>}{<}SX53,{<}PV51{>}{>}{<}IF{<}PV52{>
}>0{>}{<}SX53,{<}PV53{>}-@int(({<}PV52{>}*146097)/4){>}{<}EI{
{062}}{<}SX54,0{>}{<}IF(4*{<}PV53{>}+3)>1460{>}{<}SX54,@int((4*{<
}PV53{>}+3)/1461){>}{<}EI{>}{<}SX55,{<}PV53{>}-@int(1461*{<}P
V54{>}/4){>}{<}SX56,(5*{<}PV55{>}+2)/153{>}{<}IF{<}PV56{>}<1{
{062}}{<}SX56,0{>}{<}EI{>}{<}SX56,@int({<}PV56{>}){>}{<}SX51,{<}P
V55{>}-@int((153*{<}PV56{>}+2)/5)+1{>}{<}SX57,3{>}{<}IF{<}PV5
6{>}>0{>}{<}SX57,{<}PV56{>}+3-12*@int({<}PV56{>}/10){>}{<}EI{
{062}}{<}SX53,{<}PV54{>}-4800{>}{<}IF{<}PV52{>}>0{>}{<}SX53,{<}PV
52{>}*100+{<}PV53{>}{>}{<}EI{>}{<}IF{<}PV56{>}>0{>}{<}SX53,{<
}PV53{>}+@int({<}PV56{>}/10){>}{<}EI{>};*;[cr|lf];*;[cr|lf];*
; Output in format
mm/dd/yyyy[cr|lf]{<}SX57,{<}IS57{>}{>}{<}S
X51,{<}IS51{>}{>}{<}IF{<}VA|57{>}<2{>}{<}SX57,"0"+{<}IS57{>}{
{062}}{<}EI{>}{<}IF{<}VA|51{>}<2{>}{<}SX51,"0"+{<}IS51{>}{>}{<}EI
{>};*;[cr|lf];*;[cr|lf]{<}SX50,{<}IS57{>}+"/"+{<}IS51{>}+"/"+
{<}IS53{>}{>}{<}IF"/"{238}{<}VA$FR{>}<0{>}{<}PR@50{>}{<}EI{>}
{<}EX{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE
--
Carl Distefano
cld@xxxxxxxx
Harry Binswanger
hb@xxxxxxxx