Skip to content

[翻訳]reference/forms/types/{date,datetime,time,birtday}.rst #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 74 additions & 47 deletions reference/forms/types/birthday.rst
Original file line number Diff line number Diff line change
@@ -1,68 +1,95 @@
.. index::
single: Forms; Fields; birthday

birthday Field Type
===================

A :doc:`date</reference/forms/types/date>` field that specializes in handling
birthdate data.

Can be rendered as a single text box, three text boxes (month, day, and year),
or three select boxes.

This type is essentially the same as the :doc:`date</reference/forms/types/date>`
type, but with a more appropriate default for the `years`_ option. The `years`_
option defaults to 120 years ago to the current year.

+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Underlying Data Type | can be ``DateTime``, ``string``, ``timestamp``, or ``array`` (see the :ref:`input option <form-reference-date-input>`) |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Rendered as | can be three select boxes or 1 or 3 text boxes, based on the `widget`_ option |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Options | - `years`_ |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Inherited | - `widget`_ |
| options | - `input`_ |
| | - `months`_ |
| | - `days`_ |
| | - `format`_ |
| | - `pattern`_ |
| | - `data_timezone`_ |
| | - `user_timezone`_ |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Parent type | :doc:`date</reference/forms/types/date>` |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType` |
+----------------------+------------------------------------------------------------------------------------------------------------------------+

Field Options
-------------
.. note::

* 対象バージョン:2.3+
* 翻訳更新日:2014/04/23

birthday フィールドタイプ
=========================

:doc:`date </reference/forms/types/date>` フィールドは誕生日のデータを取り扱うことに特化しています。

1つのテキストボックス、または、3つ(年月日)のテキストボックス、または、3つのセレクトボックスとして表示されます。

このタイプは :doc:`date </reference/forms/types/date>` タイプと基本的に同じですが、より適切なデフォルトを `years`_ オプションにもちます。
`years`_ オプションにはデフォルトで 120年前から今年まで(の選択肢が入ります)。

+------------------------+-------------------------------------------------------------------------------------------+
| 対応するデータ型 | ``DateTime``, ``string``, ``timestamp``, ``array`` |
| | (参照 :ref:`input option <form-reference-date-input>`) |
+------------------------+-------------------------------------------------------------------------------------------+
| 対応するタグ | `widget`_ オプションに基づいた3つのセレクトボックス、または、1つか3つのテキストボックス |
+------------------------+-------------------------------------------------------------------------------------------+
| 上書きされたオプション | - `years`_ |
+------------------------+-------------------------------------------------------------------------------------------+
| 継承されたオプション | - `widget`_ |
| | - `input`_ |
| | - `empty_value`_ |
| | - `months`_ |
| | - `days`_ |
| | - `format`_ |
| | - `model_timezone`_ |
| | - `view_timezone`_ |
| | - `data`_ |
| | - `invalid_message`_ |
| | - `invalid_message_parameters`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `mapped`_ |
| | - `inherit_data`_ |
+------------------------+-------------------------------------------------------------------------------------------+
| 親タイプ | :doc:`date </reference/forms/types/date>` |
+------------------------+-------------------------------------------------------------------------------------------+
| クラス | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType` |
+------------------------+-------------------------------------------------------------------------------------------+

上書きされたオプション
----------------------

years
~~~~~

**type**: ``array`` **default**: 120 years ago to the current year
**データ型**: ``array`` **デフォルト**: 120年前から今年まで

List of years available to the year field type. This option is only
relevant when the ``widget`` option is set to ``choice``.
``year`` フィールドタイプで使用可能な年のリストです。このオプションは ``widget`` オプションが ``choice`` のときにのみ関連があります。

Inherited options
-----------------
継承されたオプション
--------------------

These options inherit from the :doc:`date</reference/forms/types/date>` type:
以下のオプションは :doc:`date </reference/forms/types/date>` タイプを継承しています:

.. include:: /reference/forms/types/options/date_widget.rst.inc

.. include:: /reference/forms/types/options/date_input.rst.inc

.. include:: /reference/forms/types/options/empty_value.rst.inc

.. include:: /reference/forms/types/options/months.rst.inc

.. include:: /reference/forms/types/options/days.rst.inc

.. include:: /reference/forms/types/options/date_format.rst.inc

.. include:: /reference/forms/types/options/date_pattern.rst.inc

.. include:: /reference/forms/types/options/data_timezone.rst.inc
.. include:: /reference/forms/types/options/model_timezone.rst.inc

.. include:: /reference/forms/types/options/view_timezone.rst.inc

以下のオプションは :doc:`form </reference/forms/types/form>` タイプを継承しています:

.. include:: /reference/forms/types/options/data.rst.inc

.. include:: /reference/forms/types/options/invalid_message.rst.inc

.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc

.. include:: /reference/forms/types/options/mapped.rst.inc

.. include:: /reference/forms/types/options/inherit_data.rst.inc

.. include:: /reference/forms/types/options/user_timezone.rst.inc
.. 2014/04/23 yositani2002 d49d12eaf265a5d6d32ac660c62f385d57261475
Loading