genproto: google.golang.org/genproto/googleapis/type/date_time_range Index | Files

package date_time_range

import "google.golang.org/genproto/googleapis/type/date_time_range"

Index

Package Files

datetime_range.pb.go

Variables

var File_google_actions_type_datetime_range_proto protoreflect.FileDescriptor

type DateTimeRange Uses

type DateTimeRange struct {

    // DateTime at which the date range begins. If unset, the range has no
    // beginning bound.
    Start *datetime.DateTime `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
    // DateTime at which the date range ends. If unset, the range has no ending
    // bound.
    End *datetime.DateTime `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
    // contains filtered or unexported fields
}

Represents a date and time range. This can represent:

* A range between points in time with time zone or offset, e.g. the duration

of a flight which starts in the "America/New_York" time zone and ends in
the "Australia/Sydney" time zone

* A range between points in time without time zone/offset info, e.g. an

appointment in local time

* A range starting at a specific date and time, e.g. the range of time which

can be measured in milliseconds since the Unix epoch (period starting with
1970-01-01T00:00:00Z)

* A range ending at a specific date and time, e.g. range of time before

a deadline

When considering whether a DateTime falls within a DateTimeRange, the start of the range is inclusive and the end is exclusive.

While [google.type.DateTime][google.type.DateTime] allows zero years, DateTimeRange does not. Year must always be non-zero.

When both start and end are set, either both or neither must have a time_offset. When set, time_offset can be specified by either utc_offset or time_zone and must match for start and end, that is if start has utc_offset set then end must also have utc_offset set. The values of utc_offset or time_zone need not be the same for start and end.

When both start and end are set, start must be chronologically less than or equal to end. When start and end are equal, the range is empty.

The semantics of start and end are the same as those of [google.type.DateTime][google.type.DateTime].

func (*DateTimeRange) Descriptor Uses

func (*DateTimeRange) Descriptor() ([]byte, []int)

Deprecated: Use DateTimeRange.ProtoReflect.Descriptor instead.

func (*DateTimeRange) GetEnd Uses

func (x *DateTimeRange) GetEnd() *datetime.DateTime

func (*DateTimeRange) GetStart Uses

func (x *DateTimeRange) GetStart() *datetime.DateTime

func (*DateTimeRange) ProtoMessage Uses

func (*DateTimeRange) ProtoMessage()

func (*DateTimeRange) ProtoReflect Uses

func (x *DateTimeRange) ProtoReflect() protoreflect.Message

func (*DateTimeRange) Reset Uses

func (x *DateTimeRange) Reset()

func (*DateTimeRange) String Uses

func (x *DateTimeRange) String() string

Package date_time_range imports 6 packages (graph). Updated 2020-08-13. Refresh now. Tools for package owners.