1- // Copyright 2025 Google LLC
1+ // Copyright 2026 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@ package google.type;
1818
1919import "google/protobuf/duration.proto" ;
2020
21- option cc_enable_arenas = true ;
2221option go_package = "google.golang.org/genproto/googleapis/type/datetime;datetime" ;
2322option java_multiple_files = true ;
2423option java_outer_classname = "DateTimeProto" ;
@@ -38,8 +37,8 @@ option objc_class_prefix = "GTP";
3837//
3938// The date is relative to the Proleptic Gregorian Calendar.
4039//
41- // If year is 0, the DateTime is considered not to have a specific year. month
42- // and day must have valid, non-zero values .
40+ // If year, month, or day are 0, the DateTime is considered not to have a
41+ // specific year, month, or day respectively .
4342//
4443// This type may also be used to represent a physical time if all the date and
4544// time fields are set and either case of the `time_offset` oneof is set.
@@ -54,27 +53,28 @@ message DateTime {
5453 // datetime without a year.
5554 int32 year = 1 ;
5655
57- // Required. Month of year. Must be from 1 to 12.
56+ // Optional. Month of year. Must be from 1 to 12, or 0 if specifying a
57+ // datetime without a month.
5858 int32 month = 2 ;
5959
60- // Required . Day of month. Must be from 1 to 31 and valid for the year and
61- // month.
60+ // Optional . Day of month. Must be from 1 to 31 and valid for the year and
61+ // month, or 0 if specifying a datetime without a day .
6262 int32 day = 3 ;
6363
64- // Required . Hours of day in 24 hour format. Should be from 0 to 23. An API
65- // may choose to allow the value "24:00:00" for scenarios like business
66- // closing time.
64+ // Optional . Hours of day in 24 hour format. Should be from 0 to 23, defaults
65+ // to 0 (midnight). An API may choose to allow the value "24:00:00" for
66+ // scenarios like business closing time.
6767 int32 hours = 4 ;
6868
69- // Required . Minutes of hour of day. Must be from 0 to 59.
69+ // Optional . Minutes of hour of day. Must be from 0 to 59, defaults to 0 .
7070 int32 minutes = 5 ;
7171
72- // Required . Seconds of minutes of the time. Must normally be from 0 to 59. An
73- // API may allow the value 60 if it allows leap-seconds.
72+ // Optional . Seconds of minutes of the time. Must normally be from 0 to 59,
73+ // defaults to 0. An API may allow the value 60 if it allows leap-seconds.
7474 int32 seconds = 6 ;
7575
76- // Required . Fractions of seconds in nanoseconds. Must be from 0 to
77- // 999,999,999.
76+ // Optional . Fractions of seconds in nanoseconds. Must be from 0 to
77+ // 999,999,999, defaults to 0 .
7878 int32 nanos = 7 ;
7979
8080 // Optional. Specifies either the UTC offset or the time zone of the DateTime.
@@ -96,9 +96,9 @@ message DateTime {
9696// Represents a time zone from the
9797// [IANA Time Zone Database](https://www.iana.org/time-zones).
9898message TimeZone {
99- // IANA Time Zone Database time zone, e.g. "America/New_York".
99+ // IANA Time Zone Database time zone. For example "America/New_York".
100100 string id = 1 ;
101101
102- // Optional. IANA Time Zone Database version number, e.g. "2019a".
102+ // Optional. IANA Time Zone Database version number. For example "2019a".
103103 string version = 2 ;
104104}
0 commit comments