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