- 2.61.3 (latest)
- 2.61.2
- 2.60.0
- 2.59.2
- 2.58.0
- 2.57.0
- 2.56.0
- 2.54.1
- 2.53.0
- 2.52.0
- 2.51.0
- 2.50.1
- 2.49.0
- 2.48.0
- 2.46.0
- 2.45.1
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.1
- 2.38.0
- 2.37.1
- 2.36.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.1
- 2.24.0
- 2.23.1
- 2.22.1
- 2.21.1
- 2.15.0
- 2.14.3
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.6
- 2.8.4
- 2.7.4
public final class DateTime extends GeneratedMessageV3 implements DateTimeOrBuilder
Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways:
- When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC.
- When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone.
- When neither time_zone nor utc_offset is set: a civil time on a calendar
day in local time.
The date is relative to the Proleptic Gregorian Calendar.
If year is 0, the DateTime is considered not to have a specific year. month
and day must have valid, non-zero values.
This type may also be used to represent a physical time if all the date and
time fields are set and either case of the
time_offset
oneof is set. Consider usingTimestamp
message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.
Protobuf type google.type.DateTime
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > DateTimeImplements
DateTimeOrBuilderStatic Fields
DAY_FIELD_NUMBER
public static final int DAY_FIELD_NUMBER
Type | Description |
int |
HOURS_FIELD_NUMBER
public static final int HOURS_FIELD_NUMBER
Type | Description |
int |
MINUTES_FIELD_NUMBER
public static final int MINUTES_FIELD_NUMBER
Type | Description |
int |
MONTH_FIELD_NUMBER
public static final int MONTH_FIELD_NUMBER
Type | Description |
int |
NANOS_FIELD_NUMBER
public static final int NANOS_FIELD_NUMBER
Type | Description |
int |
SECONDS_FIELD_NUMBER
public static final int SECONDS_FIELD_NUMBER
Type | Description |
int |
TIME_ZONE_FIELD_NUMBER
public static final int TIME_ZONE_FIELD_NUMBER
Type | Description |
int |
UTC_OFFSET_FIELD_NUMBER
public static final int UTC_OFFSET_FIELD_NUMBER
Type | Description |
int |
YEAR_FIELD_NUMBER
public static final int YEAR_FIELD_NUMBER
Type | Description |
int |
Static Methods
getDefaultInstance()
public static DateTime getDefaultInstance()
Type | Description |
DateTime |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
newBuilder()
public static DateTime.Builder newBuilder()
Type | Description |
DateTime.Builder |
newBuilder(DateTime prototype)
public static DateTime.Builder newBuilder(DateTime prototype)
Name | Description |
prototype | DateTime |
Type | Description |
DateTime.Builder |
parseDelimitedFrom(InputStream input)
public static DateTime parseDelimitedFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
DateTime |
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static DateTime parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
DateTime |
Type | Description |
IOException |
parseFrom(byte[] data)
public static DateTime parseFrom(byte[] data)
Name | Description |
data | byte[] |
Type | Description |
DateTime |
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static DateTime parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | byte[] |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
DateTime |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static DateTime parseFrom(ByteString data)
Name | Description |
data | ByteString |
Type | Description |
DateTime |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static DateTime parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteString |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
DateTime |
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static DateTime parseFrom(CodedInputStream input)
Name | Description |
input | CodedInputStream |
Type | Description |
DateTime |
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static DateTime parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry |
|