date.proto 1.9 KB

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