• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2021 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
15syntax = "proto3";
16
17package google.type;
18
19option cc_enable_arenas = true;
20option go_package = "google.golang.org/genproto/googleapis/type/date;date";
21option java_multiple_files = true;
22option java_outer_classname = "DateProto";
23option java_package = "com.google.type";
24option objc_class_prefix = "GTP";
25
26// Represents a whole or partial calendar date, such as a birthday. The time of
27// day and time zone are either specified elsewhere or are insignificant. The
28// date is relative to the Gregorian Calendar. This can represent one of the
29// following:
30//
31// * A full date, with non-zero year, month, and day values
32// * A month and day value, with a zero year, such as an anniversary
33// * A year on its own, with zero month and day values
34// * A year and month value, with a zero day, such as a credit card expiration
35// date
36//
37// Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and
38// `google.protobuf.Timestamp`.
39message Date {
40  // Year of the date. Must be from 1 to 9999, or 0 to specify a date without
41  // a year.
42  int32 year = 1;
43
44  // Month of a year. Must be from 1 to 12, or 0 to specify a year without a
45  // month and day.
46  int32 month = 2;
47
48  // Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
49  // to specify a year by itself or a year and month where the day isn't
50  // significant.
51  int32 day = 3;
52}
53