cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Morrison <john.morri...@experian.com>
Subject Update/sample for calendar...
Date Thu, 07 Sep 2000 15:05:33 GMT
Wow, Donald - to do the esql you must have been a saint.

I've modified (and left the previous incantation intact) the calendar.  You
can now use it similar to how esql is used!

<calendar:generate>

<calendar:input_date_format>yyyy-MM-dd</calendar:input_date_format>
 <calendar:start_date>2000-09-01</calendar:start_date> <!-- inclusive
start -->
 <calendar:end_date>2000-11-01</calendar:end_date>     <!-- exclused
end range (like C++ interators -->
 <calendar:results>
  <calendar:forEachYear>
   <year>
    <calendar:forEachMonth>
     <month>
      <xsp:attribute name="value">
       <calendar:get format="MMMM yyyy"/>
      </xsp:attribute>
      <calendar:forEachWeek>
       <week>
        <xsp:attribute name="week_of_year">
         <calendar:get value="WEEK_OF_YEAR"/>
        </xsp:attribute>
        <calendar:preBlankDays>
         <blank_day>
          <xsp:attribute name="day_of_month">
           <calendar:get value="DAY_OF_MONTH"/>
          </xsp:attribute>
          <xsp:attribute name="day_of_year">
           <calendar:get value="DAY_OF_YEAR"/>
          </xsp:attribute>
         </blank_day>
        </calendar:preBlankDays>
        <calendar:forEachDay>
         <day>
          <xsp:attribute name="day_of_month">
           <calendar:get value="DAY_OF_MONTH"/>
          </xsp:attribute>
          <xsp:attribute name="day_of_year">
           <calendar:get value="DAY_OF_YEAR"/>
          </xsp:attribute>
          <xsp:attribute name="today">
           <calendar:isToday/>
          </xsp:attribute>
         </day>
        </calendar:forEachDay>
        <calendar:postBlankDays>
         <blank_day>
          <xsp:attribute name="day_of_month">
           <calendar:get value="DAY_OF_MONTH"/>
          </xsp:attribute>
          <xsp:attribute name="day_of_year">
           <calendar:get value="DAY_OF_YEAR"/>
          </xsp:attribute>
         </blank_day>
        </calendar:postBlankDays>
       </week>
      </calendar:forEachWeek>
     </month>
    </calendar:forEachMonth>
   </year>
  </calendar:forEachYear>
 </calendar:results>
</calendar:generate>

It still has some limitations and the granularity only goes to days.  You
can however start with any forEachXXX - but I didn't check for infinite
loops *you have been warned!*

John.



=======================================================================
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF
begin 644 calendar.zip
M4$L#!!0````(`$EW)RE@"5M=%`L``%HI```,````8V%L96YD87(N>'-LO5IM
M<]I($O[L5.U_Z&BW8M@#:7VYJZOX;2V#'.L.`X=$O*ZK*Z\L#:"+T+"2`+.[
M^>_7/2,)\2*,$R>NV$::F>ZGGWZ5G-.?'\<!S%@4^SP\4X[4GY2?S[][=?JZ
M7O_N%9R]X!>*V_RR1PSTB>/B+XL/DKD3,6CY+@MC5H,/$A4<J4<OC@4%-OAD
M$?G#40*51A4N%LR)+K8"NN+3T',2A**"'@0@#L40L9A%,^:I0EJ/>7Z<1/[#
ME#:"$WHPC1GX(<1\&KE,W'GP0R=:P(!'X[@&<S\9`8_$;SY-8,P]?^"[#C%/
M0FI`VB<L&OM)PCR81'SF>_@A&3D)_F`H*`CXW`^'X/+0\^E0+`Z-67(L8!VI
M:\ABX`/(,+G<P[W3.`&T)G$0+$EU'OB,UC)Z(.0)^J0F/9B,_!@"E$B"BFI#
M;PT3JG4#QQ^S2%+TUTTLJ+'`B802,334FR*\;6"^&`ND5GK<G8Y9F`C'2G%X
M3$-_<%R.8.PD+/*=(%[R+APFSA:,D+:]547HL-"KH]NC5>FHT@VF*Q*B%2)J
MX`]0^Z(F&)!@TC.P9@@X[L>0SP/F#4G^,8!B$PN2LR0[%I./9?Q*<1Z;L8!/
M$`,\+(3,'7$.4!DER>18T^;SN>J(?2J/AEI55:0X/4!V0J0H0-#"#6O`D+\%
MWIM,,*TRRC-$X"<Q"P8U-'*0,P]S9!U!1A!/72+)C[SZQ(F2Q9KD&&,@&CM!
ML$C%2P_\37H@=,9HO-+@+N>A(@2#4FZI`C+H,*S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