Date
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
誕生日などのように、カレンダーの日付全体またはその一部を表します。時間帯とタイムゾーンは、他の場所で指定されているか、重要ではありません。日付はグレゴリオ暦を基準にしています。これは次のいずれかを表します。
- ゼロ以外の年、月、日の値を含む完全な日付
- 記念日など、年がゼロである月と日の値
- 月と日の値がゼロである単独の年
- クレジット カードの有効期限など、日がゼロである年と月の値
関連する型は、google.type.TimeOfDay
と google.protobuf.Timestamp
です。
JSON 表現 |
{
"year": integer,
"month": integer,
"day": integer
} |
フィールド |
year |
integer
その日付の年。1~9999、または年のない日付を指定する場合は 0 にする必要があります。
|
month |
integer
1 年の中の月。1~12、または月と日のない年を指定する場合は 0 にする必要があります。
|
day |
integer
1 月の中の日付。1~31 で、その年と月に対して有効である必要があります。または、日が重要でない場合に年のみか年と月を指定するには 0 にする必要があります。
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003e\u003ccode\u003egoogle.type.Date\u003c/code\u003e represents a calendar date, including full dates, month/day combinations, years, or year/month combinations.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes the Gregorian Calendar and can be used for birthdays, anniversaries, and credit card expirations.\u003c/p\u003e\n"],["\u003cp\u003eThe JSON representation consists of \u003ccode\u003eyear\u003c/code\u003e, \u003ccode\u003emonth\u003c/code\u003e, and \u003ccode\u003eday\u003c/code\u003e integer fields, with 0 values indicating the absence of a specific component.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egoogle.type.Date\u003c/code\u003e is related to \u003ccode\u003egoogle.type.TimeOfDay\u003c/code\u003e and \u003ccode\u003egoogle.protobuf.Timestamp\u003c/code\u003e for representing other temporal aspects.\u003c/p\u003e\n"]]],[],null,["# Date\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nRepresents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:\n\n- A full date, with non-zero year, month, and day values\n- A month and day value, with a zero year, such as an anniversary\n- A year on its own, with zero month and day values\n- A year and month value, with a zero day, such as a credit card expiration date\n\nRelated types are [google.type.TimeOfDay](/my-business/reference/rest/v4/accounts.locations.localPosts#TimeOfDay) and `google.protobuf.Timestamp`.\n\n| JSON representation ||\n|---------------------------------------------------------------|---|\n| ``` { \"year\": integer, \"month\": integer, \"day\": integer } ``` |\n\n| Fields ||\n|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `year` | `integer` Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |\n| `month` | `integer` Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |\n| `day` | `integer` Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. |"]]