[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

RE: P.S. to simple calendar question



Reply to note from "M.W. Poirier"  Sun,
29 Jul 2007 08:50:55 -0400 (EDT)

Maben:

> 1. Why does DIARYYEAR begin with the month of December at the  
> top of the file and move backwards towards January? Would  
> it not be more conventional to have it move through the  
> calander in the opposite direction, i.e., from January to
> December?

Whoops, my bad! RENUMBERing error introduced at the last minute.
Correction below.

> 2. You changed the HOLIDAYS programme at some point, and I  
> obviously missed the change. I once had all of the Canadian  
> civil and religious holidays listed, and now I don't, and  
> I really don't want to mess-up your file because of the  
> calculations incorporated in it. Would it be possible to  
> send me your old HOLIDAYS programme?

I'm loath to send you old code, Maben. Why not simply make a copy
of the current version, and mark it up? The earlier versions of
this routine were no less complicated, as I recall. In the
alternative, if you send me a list of the additions/changes that you
want, I'll do it for you.

Here are the corrected diary frames:

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5DiaryYear}} Make diary template for specified year [CLD 1
0/11/94 rev. 7/29/07][cr|lf]{002}{<}IF{<}VA|50{>}<1{>}{<}PRDi
aryYear yyyy{>}{<}EX{>}{<}EI{>}{<}SX47,{<}VA$WA{>}{>
}{<}IF{<}PV47{>}<1{>}{<}PRNo window{>}{<}EX{>}{<}EI{>}[BX_]fu
nc #{<}PV47{>}[Q2_][BX_]ne/100[Q2_]{<}SX47,{<}IS50{>}{>}{<}SX
48,12{>}{<}SX49,0{>}{<}CUa,48{>}{<}SX49,{<}PV49{>}+1{>}{<}SX5
0,{<}IS49{>}+"/"+{<}IS47{>}{>}[JM_]2.DiaryMonth[Q2_]{<}LBa{>}
[TF_][WG_][NM_]{<}PRYear @47{>}{002}[cr|lf][cr|lf]{{;5DiaryMo
nth}} Make diary template for specified month/year [CLD 10/11
/94 rev. 7/29/07][cr|lf]{002}{<}IF{<}VA$WS{>}<>1{>}{<}IF{<}VA
$WA{>}<1{>}{<}PRNo window{>}{<}EX{>}{<}EI{>}{<}SX51,{<}VA$WA{
{062}}{>}[BX_]func #{<}PV51{>}[Q2_][BX_]ne/100[Q2_]{<}EI{>}{<}SX0
0,{<}VA@50{>}{>}{<}LBa{>}{<}SV51,/{>}{<}IF"/"{238}{<}IS00{>}<
0{>}{<}IF"-"{238}{<}IS00{>}<0{>}{<}GLb{>}{<}EI{>}{<}SV51,-{>}
{<}EI{>}{<}XS00,51,52,53,54{>}{<}IF{<}VA{021}52{>}+{<}VA{021}
54{>}<2{>}{<}GLb{>}{<}EI{>}{<}IF{<}PV54{>}<100{>}{<}SX54,{<}P
V54{>}+2000{>}{<}EI{>}{<}IF{<}PV52{>}<1!{<}PV52{>}>12!{<}PV54
{>}<1583{>}{<}LBb{>}{<}PRDiaryMonth m/yy[yy]{>}{<}EX
{>}{<}EI{>}{<}SX51,31{>}{<}IF("|"+{<}IS52{>}+"|"){238}"|4|6|9
|11|">-1{>}{<}SX51,30{>}{<}GLe{>}{<}EI{>}{<}IF{<}PV52{>}<>2{>
}{<}GLe{>}{<}EI{>}{<}SX51,28{>}{<}SX53,{<}PV54{>}/100{>}{<}SX
53,{<}IS53{>}{>}{<}IF"."{238}{<}IS53{>}<>{<}VA|53{>}-1{>}{<}G
Lc{>}{<}EI{>}{<}SX53,{<}PV54{>}/400{>}{<}SX53,{<}IS53{>}{>}{<
}IF"."{238}{<}IS53{>}<>{<}VA|53{>}-1{>}{<}GLe{>}{<}EI{>}{<}GL
d{>}[cr|lf]{<}LBc{>}{<}SX53,{<}PV54{>}/4{>}{<}SX53,{<}IS53{>}
{>}{<}IF"."{238}{<}IS53{>}<>{<}VA|53{>}-1{>}{<}GLe{>}{<}EI{>}
{<}LBd{>}{<}SX51,29{>}{<}LBe{>}{<}SX
56,0{>}{<}LBf{>}{<}SX56,{<}PV56{>}+1{>}{<}IF{<}PV56{>}<={<}PV
51{>}{>}{<}SX50,{<}IS52{>}+"/"+{<}IS56{>}+"/"+{<}IS54{>}{>}[J
M_]2.DiaryEntry[Q2_]{<}GLf{>}{<}EI{>}{<}PRDone{>}{<}EX{>}{002
}[cr|lf][cr|lf]{{;5DiaryEntry}} Put diary entry for one day [
CLD 10/11/94 rev. 7/29/07][cr|lf]{002}{<}IF{<}VA$WS{>}<>1{>}{
<}IF{<}VA$WA{>}<1{>}{<}PRNo window{>}{<}EX{>}{<}EI{>}{<}SX01,
{<}VA$WA{>}{>}[BX_]func #{<}PV01{>}[Q2_][BX_]ne/100[Q2_]{<}EI
{>}[GT_]{<}SX01,{<}VA@50{>}{>}{<}SX05,{<}VA@50/3{>}{>}{<}IF{<
}VA|05{>}<4{>}{<}SX05,{<}PV05{>}+2000{>}{<}SX05,{<}IS05{>}{>}
{<}EI{>}{<}SX44,{<}VA@50/1{>}{>}{<}IF{<}VA|44{>}<2{>}{<}SX44,
"0"+{<}IS44{>}{>}{<}EI{>}{<}SX45,{<}VA@50/2{>}{>}{<}IF{<}VA|4
5{>}<2{>}{<}SX45,"0"+{<}IS45{>}{>}{<}EI{>}{<}SX05,{<}IS05{>}+
"{tab}"+{<}IS44{>}+"{tab}"+{<}IS45{>}+"{tab};{tab}{tab}{tab}"
{>}[JM_]2.Zeller[Q2_]{<}SX01,{<}VA@50/1{>}+"|"{>}{<}SV02,1|Ja
nuary,2|February,3|March,4|April,5|May,6|June,7|July,8|August
,9|September,10|October,11|November,12|December{>}{<}XS02,01,
03,,04{>}{<}SX03,{<}VA@50/3{>}{>}{<}IF@siz({<}IS03{>})<4{>}{<
}SX03,"20"+{<}IS03{>}{>}{<}EI{>}{<}SX01,{<}VA@04,1{>}+" "+{<}
VA@50/2{>}+", "+{<}IS03{>}{>}{<}SV45,Mon|Tues|Wednes|Thurs|Fr
i|Satur|Sun{>}{<}SX44,"{<}VA@45|"+{<}IS44{>}+"{>}+""day{tab}"
"+{<}IS01{>}{>}{<}SX44,{<}PV44{>}{>}{<}SX44,{<}IS05{>}+{<}IS4
4{>}+"[cr|lf][cr|lf]"{>}{<}GT44{>}[DO_]{<}EX{>}{002}[cr|lf][c
r|lf]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx