| 1 |
// Copyright 2026 Google LLC |
| 2 |
// |
| 3 |
// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
// you may not use this file except in compliance with the License. |
| 5 |
// You may obtain a copy of the License at |
| 6 |
// |
| 7 |
// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
// |
| 9 |
// Unless required by applicable law or agreed to in writing, software |
| 10 |
// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
// See the License for the specific language governing permissions and |
| 13 |
// limitations under the License. |
| 14 |
|
| 15 |
syntax = "proto3"; |
| 16 |
|
| 17 |
package google.type; |
| 18 |
|
| 19 |
option go_package = "google.golang.org/genproto/googleapis/type/date;date"; |
| 20 |
option java_multiple_files = true; |
| 21 |
option java_outer_classname = "DateProto"; |
| 22 |
option java_package = "com.google.type"; |
| 23 |
option objc_class_prefix = "GTP"; |
| 24 |
|
| 25 |
// Represents a whole or partial calendar date, such as a birthday. The time of |
| 26 |
// day and time zone are either specified elsewhere or are insignificant. The |
| 27 |
// date is relative to the Gregorian Calendar. This can represent one of the |
| 28 |
// following: |
| 29 |
// |
| 30 |
// * A full date, with non-zero year, month, and day values. |
| 31 |
// * A month and day, with a zero year (for example, an anniversary). |
| 32 |
// * A year on its own, with a zero month and a zero day. |
| 33 |
// * A year and month, with a zero day (for example, a credit card expiration |
| 34 |
// date). |
| 35 |
// |
| 36 |
// Related types: |
| 37 |
// |
| 38 |
// * [google.type.TimeOfDay][google.type.TimeOfDay] |
| 39 |
// * [google.type.DateTime][google.type.DateTime] |
| 40 |
// * [google.protobuf.Timestamp][google.protobuf.Timestamp] |
| 41 |
message Date { |
| 42 |
// Year of the date. Must be from 1 to 9999, or 0 to specify a date without |
| 43 |
// a year. |
| 44 |
int32 year = 1; |
| 45 |
|
| 46 |
// Month of a year. Must be from 1 to 12, or 0 to specify a year without a |
| 47 |
// month and day. |
| 48 |
int32 month = 2; |
| 49 |
|
| 50 |
// Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 |
| 51 |
// to specify a year by itself or a year and month where the day isn't |
| 52 |
// significant. |
| 53 |
int32 day = 3; |
| 54 |
} |