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

RE: P.S. to simple calendar question



Reply to note from "Paul Ambos"  Fri, 27 Jul
2007 14:32:15 -0400

> For myself I have utilized an implementation of a XyWrite file
> that constitutes a calendar in sortable format where each day
> is identified on a new line of the form
>
> 2007 07 27[tab];[tab][tab][tab]Friday[tab]July 27, 2007
> ...

I've done something similar for many years. I have personal U2
frames that generate a diary template for any given day, month or
year. They could easily be adapted to your format -- in fact, here
they are. DeFine the entire block of code below, issue
DECODE, then DeFine the result in its entirety and issue
ADD2U2 to add it to your U2 file. The available commands
are:

DiaryYear yyyy   <== Create template for year
DiaryMonth m/yyyy  <== Create template for month
DiaryEntry m/d/yyyy <== Create template for day

Obviously, you need to substitute actual (numeric) dates for m, d
and yyyy in each case. For example, to make a 2008 calendar, create
a file with your normal calendar headers, position the cursor below
the headers, and issue:

DiaryYear 2008

Enjoy.

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5DiaryYear}} Make diary template for specified year [CLD 1
0/11/94][cr|lf]{002}{<}IF{<}VA|50{>}<1{>}{<}PRDiaryYear yyyy<
Helpkey>{>}{<}EX{>}{<}EI{>}{<}SX47,{<}VA$WA{>}{>}{<}IF{<}PV47
{>}<1{>}{<}PRNo window{>}{<}EX{>}{<}EI{>}[BX_]func #{<}PV47{>
}[Q2_][BX_]ne/100[Q2_]{<}SX47,{<}IS50{>}{>}{<}SX48,12{>}{<}SX
49,0{>}{<}CUa,48{>}{<}SX49,{<}PV49{>}+1{>}{<}SX50,{<}IS49{>}+
"/"+{<}IS47{>}{>}[JM_]2.DiaryMonth[Q2_]{<}LBa{>}[TF_][WG_]{<}
PRYear @47{>}{002}[cr|lf][cr|lf]{{;5DiaryMonth}} Make diary t
emplate for specified month/year [CLD 10/11/94][cr|lf]{002}{<
}IF{<}VA$WS{>}<>1{>}{<}IF{<}VA$WA{>}<1{>}{<}PRNo window{>}{<}
EX{>}{<}EI{>}{<}SX51,{<}VA$WA{>}{>}[BX_]func #{<}PV51{>}[Q2_]
[BX_]ne/100[Q2_]{<}EI{>}{<}SX00,{<}VA@50{>}{>}{<}LBa{>}{<}SV5
1,/{>}{<}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{>}{<}I
F{<}PV54{>}<100{>}{<}SX54,{<}PV54{>}+2000{>}{<}EI{>}{<}IF{<}P
V52{>}<1!{<}PV52{>}>12!{<}PV54{>}<1583{>}{<}LBb{>}{<}PRDiaryM
onth m/yy[yy]{>}{<}EX{>}{<}EI{>}{<}SX51,31{>}{<}IF("
|"+{<}IS52{>}+"|"){238}"|4|6|9|11|">-1{>}{<}SX51,30{>}{<}GLe{
{062}}{<}EI{>}{<}IF{<}PV52{>}<>2{>}{<}GLe{>}{<}EI{>}{<}SX51,28{>}
{<}SX53,{<}PV54{>}/100{>}{<}SX53,{<}IS53{>}{>}{<}IF"."{238}{<
}IS53{>}<>{<}VA|53{>}-1{>}{<}GLc{>}{<}EI{>}{<}SX53,{<}PV54{>}
/400{>}{<}SX53,{<}IS53{>}{>}{<}IF"."{238}{<}IS53{>}<>{<}VA|53
{>}-1{>}{<}GLe{>}{<}EI{>}{<}GLd{>}[cr|lf]{<}LBc{>}{<}SX53,{<}
PV54{>}/4{>}{<}SX53,{<}IS53{>}{>}{<}IF"."{238}{<}IS53{>}<>{<}
VA|53{>}-1{>}{<}GLe{>}{<}EI{>}{<}LBd{>}{<}SX51,29{>}{<}LBe{>}
{<}SX56,0{>}{<}LBf{>}{<}SX56
,{<}PV56{>}+1{>}{<}IF{<}PV56{>}<={<}PV51{>}{>}{<}SX50,{<}IS52
{>}+"/"+{<}IS56{>}+"/"+{<}IS54{>}{>}[JM_]2.DiaryEntry[Q2_]{<}
GLf{>}{<}EI{>}[TF_][WG_]{<}PRDone{>}{<}EX{>}{002}[cr|lf][cr|l
f]{{;5DiaryEntry}} Put diary entry for one day [CLD 10/11/94]
[cr|lf]{002}{<}IF{<}VA$WS{>}<>1{>}{<}IF{<}VA$WA{>}<1{>}{<}PRN
o window{>}{<}EX{>}{<}EI{>}{<}SX01,{<}VA$WA{>}{>}[BX_]func #{
<}PV01{>}[Q2_][BX_]ne/100[Q2_]{<}EI{>}[GT_]{<}SX01,{<}VA@50{>
}{>}{<}SX02,{<}VA@50/3{>}{>}{<}IF{<}VA|02{>}<4{>}{<}SX02,{<}P
V02{>}+2000{>}{<}SX02,{<}IS02{>}{>}{<}EI{>}{<}SX44,{<}VA@50/1
{>}{>}{<}IF{<}VA|44{>}<2{>}{<}SX44,"0"+{<}IS44{>}{>}{<}EI{>}{
<}SX45,{<}VA@50/2{>}{>}{<}IF{<}VA|45{>}<2{>}{<}SX45,"0"+{<}IS
45{>}{>}{<}EI{>}{<}SX02,{<}IS02{>}+"{tab}"+{<}IS44{>}+"{tab}"
+{<}IS45{>}+"{tab};{tab}{tab}{tab}"{>};*;[cr|lf][JM_]2.Zeller
{<}SX50,{<}IS01{>}{>}[Q2_]{<}SX01,{<}VA@50/1{>}+"|"{>}{<}SV03
,1|January,2|February,3|March,4|April,5|May,6|June,7|July,8|A
ugust,9|September,10|October,11|November,12|December{>}{<}XS0
3,01,04,,05{>}{<}SX04,{<}VA@50/3{>}{>}{<}IF@siz({<}IS04{>})<4
{>}{<}SX04,"20"+{<}IS04{>}{>}{<}EI{>}{<}SX01,{<}VA@05,1{>}+"{032}
"+{<}VA@50/2{>}+", "+{<}IS04{>}{>}{<}SV45,Mon|Tues|Wednes|Thu
rs|Fri|Satur|Sun{>}{<}SX44,"{<}VA@45|"+{<}IS44{>}+"{>}+""day{
tab}""+{<}IS01{>}{>}{<}SX44,{<}PV44{>}{>}{<}SX44,{<}IS02{>}+{
<}IS44{>}+"[cr|lf][cr|lf]"{>}{<}GT44{>}[DO_]{<}EX{>}{002}[cr|
lf][cr|lf]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx