Reference documentation and code samples for the Google API Common Protos Client class TimeOfDay.
Represents 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 aregoogle.type.Dateandgoogle.protobuf.Timestamp.
Generated from protobuf messagegoogle.type.TimeOfDay
Namespace
Google \ Type
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ hours
int
Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
↳ minutes
int
Minutes of hour of day. Must be from 0 to 59.
↳ seconds
int
Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
↳ nanos
int
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
getHours
Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
to allow the value "24:00:00" for scenarios like business closing time.
Returns
Type
Description
int
setHours
Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
to allow the value "24:00:00" for scenarios like business closing time.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getMinutes
Minutes of hour of day. Must be from 0 to 59.
Returns
Type
Description
int
setMinutes
Minutes of hour of day. Must be from 0 to 59.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getSeconds
Seconds of minutes of the time. Must normally be from 0 to 59. An API may
allow the value 60 if it allows leap-seconds.
Returns
Type
Description
int
setSeconds
Seconds of minutes of the time. Must normally be from 0 to 59. An API may
allow the value 60 if it allows leap-seconds.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getNanos
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
Returns
Type
Description
int
setNanos
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google API Common Protos Client - Class TimeOfDay (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Type.TimeOfDay)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Type.TimeOfDay)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Type.TimeOfDay)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Type.TimeOfDay)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Type.TimeOfDay)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Type.TimeOfDay) \nReference documentation and code samples for the Google API Common Protos Client class TimeOfDay.\n\nRepresents a time of day. The date and time zone are either not significant\nor are specified elsewhere. An API may choose to allow leap seconds. Related\ntypes are [google.type.Date](/php/docs/reference/common-protos/latest/Type.Date) and\n`google.protobuf.Timestamp`.\n\nGenerated from protobuf message `google.type.TimeOfDay`\n\nNamespace\n---------\n\nGoogle \\\\ Type\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getHours\n\nHours of day in 24 hour format. Should be from 0 to 23. An API may choose\nto allow the value \"24:00:00\" for scenarios like business closing time.\n\n### setHours\n\nHours of day in 24 hour format. Should be from 0 to 23. An API may choose\nto allow the value \"24:00:00\" for scenarios like business closing time.\n\n### getMinutes\n\nMinutes of hour of day. Must be from 0 to 59.\n\n### setMinutes\n\nMinutes of hour of day. Must be from 0 to 59.\n\n### getSeconds\n\nSeconds of minutes of the time. Must normally be from 0 to 59. An API may\nallow the value 60 if it allows leap-seconds.\n\n### setSeconds\n\nSeconds of minutes of the time. Must normally be from 0 to 59. An API may\nallow the value 60 if it allows leap-seconds.\n\n### getNanos\n\nFractions of seconds in nanoseconds. Must be from 0 to 999,999,999.\n\n### setNanos\n\nFractions of seconds in nanoseconds. Must be from 0 to 999,999,999."]]