シンプルカレンダ
サンプル表示

Pearカレンダの基本

PEAR::Calendarを単純に使用した場合、カレンダが_どのように表示されるか見てみましょう。
これを使用するとカレンダが一気にできてしまいます。
ここまではすばらしいです。
シンプルカレンダの作成にあたっては、インスタンスを作成時、
第1引数に、現在の年
第2引数に、現在の月
第3引数に、何もナシ
を指定しています。
よって、現在の月のカレンダが月曜日から表示されて完了です。

シンプルカレンダ表示内容

日にちは、左寄せで表示されます。
日~土の曜日表示はありません。
現在の日付けに印はつきません。
日にちの色別表示はありません。
祝日表示はありません。
月曜日スタ-トです。
以下に今月の表示例を示します。



Fatal error: Uncaught Error: Call to a member function getDaysInMonth() on null in /home/sen1000/sen1000.minibird.jp/public_html/pear/PEAR/Calendar/Month.php:100 Stack trace: #0 /home/sen1000/sen1000.minibird.jp/public_html/pear/PEAR/Calendar/Month/Weekdays.php(133): Calendar_Month->build(Array) #1 /home/sen1000/63pear.devel.jp/public_html/calendar-simple.php(32): Calendar_Month_Weekdays->build() #2 /home/sen1000/63pear.devel.jp/public_html/calen_s_disp.php(47): include('/home/sen1000/6...') #3 {main} thrown in /home/sen1000/sen1000.minibird.jp/public_html/pear/PEAR/Calendar/Month.php on line 100