Google 课堂插件现已面向开发者正式推出!如需了解详情,请参阅
插件文档。
TimeOfDay
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
表示一天中的某个时间。日期和时区不重要,或在别处指定。API 可以选择允许闰秒。相关类型为 google.type.Date
和 google.protobuf.Timestamp
。
JSON 表示法 |
{
"hours": integer,
"minutes": integer,
"seconds": integer,
"nanos": integer
} |
字段 |
hours |
integer
一天中的时段(采用 24 小时制)。必须大于或等于 0,通常必须小于或等于 23。对于业务结束时间等场景,API 可以选择允许“24:00:00”一值。
|
minutes |
integer
一小时中的分钟数。必须大于或等于 0,小于或等于 59。
|
seconds |
integer
一分钟中的秒数。必须大于或等于 0,通常必须小于或等于 59。如果 API 允许闰秒,则 API 可以允许 60 一值。
|
nanos |
integer
秒数的小数部分(以纳秒为单位)。必须大于或等于 0,且小于或等于 999,999,999。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# TimeOfDay\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nRepresents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are [google.type.Date](/workspace/classroom/reference/rest/v1/Date) and `google.protobuf.Timestamp`.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------|\n| ``` { \"hours\": integer, \"minutes\": integer, \"seconds\": integer, \"nanos\": integer } ``` |\n\n| Fields ||\n|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `hours` | `integer` Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time. |\n| `minutes` | `integer` Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59. |\n| `seconds` | `integer` Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds. |\n| `nanos` | `integer` Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999. |"]]