# File Examples/Calendar/OrientalZodiacCalendar.rb, line 45
  def print_calendar(year, month)

    # 指定された月の初日の情報をもとに
    # 最終日が何日かと、
    # カレンダ上の初日の表示位置とを求める
    first = Date.new(year, month, 1)
    end_of_month = ((first >> 1) - 1).day
    start = 6 - first.wday

    # 年の干支 と 月の干支 を求める
    work_date = AlmanacDateTime.new(year,month,1,12,0,0,Rational(3,8))
    oriental_zodiac = AlmanacOrientalZodiac.new

    oriental_zodiac_year \
      = AlmanacOrientalZodiac::ORIENTAL_ZODIAC_NAME_J[
          oriental_zodiac.get_oriental_zodiac_of_year_number(work_date)]
    oriental_zodiac_month \
      = AlmanacOrientalZodiac::ORIENTAL_ZODIAC_NAME_J[
          oriental_zodiac.get_oriental_zodiac_of_month_number(work_date)]

    # コンソールの初期化
    # ※ Curses ライブラリを使用
    Curses::init_screen

    # 年月日情報 および 年の干支 月の干支 情報の編集
    title_string = "     " + year.to_s + "年(" + oriental_zodiac_year + ") " \
      + month.to_s + "月(" + oriental_zodiac_month + ") " + "\n"

    # 年月日情報を表示バッファにセット
    Curses::addstr(title_string)

    # 曜日情報の表示バッファにセット
    Curses::addstr(" 日   月   火   水   木   金   土  " + "\n")

    # 日付 および 日の干支 情報をカレンダ形式に編集し
    # 表示バッファにセット
    WEEK_TABLE.each{|week|
      week_buf = ""
      oriental_zodiac_buf = ""
      week[start, 7].each{|day|
        if day > end_of_month
          week_buf << "     "
          oriental_zodiac_buf << "     "
        else
          work_week = sprintf("%3d", day) + "  "
          week_buf << work_week
          work_oriental_zodiac_string \
            = AlmanacOrientalZodiac::ORIENTAL_ZODIAC_NAME_J[
              oriental_zodiac.get_oriental_zodiac_of_day_number(work_date)] + " "
          oriental_zodiac_buf << work_oriental_zodiac_string
          work_date = work_date + 1
        end
      }
      week_buf = week_buf +"\n"
      Curses::addstr(week_buf)
      oriental_zodiac_buf = oriental_zodiac_buf +"\n"
      Curses::addstr(oriental_zodiac_buf)
    }

    # コンソール画面に表示を実施
    Curses::refresh
    Curses::getch
    Curses::close_screen
  end