| <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Calendar</title><link rel="stylesheet" type="text/css" href="rivet.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="calendar_package.html" title="Calendar Package"><link rel="prev" href="calendar_package.html" title="Calendar Package"><link rel="next" href="xml_calendar.html" title="XmlCalendar"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Calendar</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="calendar_package.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Calendar Package</th><td width="20%" align="right"> <a accesskey="n" href="xml_calendar.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="refentry"><a name="calendar"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Calendar — Utility class the builds and prints a calendar table</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">Calendar</span> <span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>calendar_name</code></em></span> </div></div></div><div class="refsect1"><a name="idm3733"></a><h2>Calendar object subcommands</h2><p style="width:90%"> |
| The main public command for a calendar object is |
| <span style="font-family:monospace"><span class="command"><strong>emit</strong></span></span> that returns a calendar table |
| </p></div><div class="refsect1"><a name="idm3737"></a><div class="variablelist"><p style="width:90%"> |
| The method <span style="font-family:monospace"><span class="command"><strong>emit</strong></span></span> when invoked with a single argument |
| takes it as an year number and prints the whole calendar of |
| that year. When invoked with 2 arguments takes the first as a month, either |
| expressed in its shortened form ('Jan','Feb',...) or as a number in the |
| range 1-12. The second argument is a year number. |
| </p><dl class="variablelist"><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "> |
| calendar_obj <span style="font-weight:bold ; font-family:monospace">emit</span> </div></div><div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "> |
| calendar_obj <span style="font-weight:bold ; font-family:monospace">emit</span> ?<span style="font-family:monospace; font-weight: bold;">month</span>? ?<span style="font-family:monospace; font-weight: bold;">year</span>?</div></div><div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "> |
| calendar_obj <span style="font-weight:bold ; font-family:monospace">emit</span> ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>month | year</code></em></span>?</div></div><div style="margin-bottom:1.5ex ; padding .5ex"> |
| The method 'emit' if invoked without arguments returns an |
| ASCII formatted calendar of the current month |
| </div><pre class="programlisting"> |
| set cal [Calendar #auto] |
| set current_month [$cal emit] |
| puts $current_month |
| Jun 2010 |
| Su Mo Tu We Th Fr Sa |
| 1 2 3 4 5 |
| 6 7 8 9 10 11 12 |
| 13 14 15 16 17 18 19 |
| 20 21 22 23 24 25 26 |
| 27 28 29 30</pre></div></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="calendar_package.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="calendar_package.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="xml_calendar.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Calendar Package </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> XmlCalendar</td></tr></table></div></body></html> |