<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="topic" id="calendar" lang="ja">
  <info>
    <link type="guide" xref="index#dialogs"/>
    <desc><cmd>--calendar</cmd> オプションの使用</desc>
    <license xmlns="http://projectmallard.org/1.0/" href="https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt">

  <p>This work is licensed under a
  <link href="https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt">GNU Free
  Documentation License Version 1.1</link> or any later version.</p>

	<p>
	  Permission is granted to copy, distribute and/or modify this
	  document under the terms of the GNU Free Documentation
	  License (GFDL), Version 1.1 or any later version published
	  by the Free Software Foundation with no Invariant Sections,
	  no Front-Cover Texts, and no Back-Cover Texts.  You can find
	  a copy of the GFDL at this
	  <link href="https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt">link</link>.
         </p>
         <p>This manual is part of a collection of GNOME manuals distributed under the GFDL. If you want to distribute this manual separately from the collection, you can do so by adding a copy of the license to the manual, as described in section 6 of the license.</p>

	<p>Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and the members of the GNOME Documentation Project are made aware of those trademarks, then the names are in capital letters or initial capital letters.</p>

	<p>
	  DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED
	  UNDER  THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE
	  WITH THE FURTHER UNDERSTANDING THAT:
	</p>
	<list>
		<item>
		  <p>DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND</p>
		</item>
		<item>
		  <p>UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
		</item>
	  </list>
</license>
  <credit type="translator copyright"><name>赤星　柔充</name><email>yasumichi@vinelinux.org</email><years>2011,2012</years></credit></info>
  <title>カレンダーダイアログ</title>
    <p>カレンダーダイアログを作成するには、<cmd>--calendar</cmd> というオプションを使ってください。<app>Zenity</app> は、標準出力へ選択された日付を返却します。コマンドラインで日付を指定しなかった場合、ダイアログは現在の日付を利用します。</p>
    <p>カレンダーダイアログは、以下のオプションをサポートしています。</p>

    <terms>

      <item>
        <title><cmd>--text</cmd>=<var>テキスト</var></title>
	<p>カレンダーダイアログに表示されるテキストを指定します。</p>
      </item>
     	
      <item>
        <title><cmd>--day</cmd>=<var>日</var></title>
	<p>カレンダーダイアログで選択されている日を指定します。日は、1 から 31 の数字でなければなりません。</p>
      </item>

      <item>
        <title><cmd>--month</cmd>=<var>月</var></title>
	<p>カレンダーダイアログで選択されている月を指定します。月は、1 から 12 の数字でなければなりません。</p>
      </item>

      <item>
        <title><cmd>--year</cmd>=<var>年</var></title>
	<p>カレンダーダイアログで選択されている年を指定します。(訳注:西暦の数字部分で指定します。)</p>
      </item>

      <item>
        <title><cmd>--date-format</cmd>=<var>書式</var></title>
	<p>日付が選択された後、カレンダーダイアログが返却する書式を指定します。デフォルトの書式は、locale に依存します。書式は、 <cmd>strftime</cmd> 関数が受け取れる書式でなければなりません。たとえば、<var>%A %d/%m/%y</var> です。</p>
      </item>

    </terms>

    <p>以下のスクリプトの例でカレンダーダイアログの作成方法を示します。</p>

<code>
#!/bin/sh


if zenity --calendar \
--title="日付の選択" \
--text="日付をクリックして選択してください。" \
--day=10 --month=8 --year=2004
  then echo $?
  else echo "日付が選択されませんでした。"
fi
</code>


    <figure>
      <title>カレンダーダイアログの例</title>
      <desc>Zenity カレンダーダイアログの例</desc>
      <media type="image" mime="image/png" src="figures/zenity-calendar-screenshot.png"/>
   </figure>
</page>
