date_time_range

package
v0.0.0-...-e639e21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_google_actions_type_datetime_range_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type DateTimeRange

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 deprecated

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

Deprecated: Use DateTimeRange.ProtoReflect.Descriptor instead.

func (*DateTimeRange) GetEnd

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

func (*DateTimeRange) GetStart

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

func (*DateTimeRange) ProtoMessage

func (*DateTimeRange) ProtoMessage()

func (*DateTimeRange) ProtoReflect

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

func (*DateTimeRange) Reset

func (x *DateTimeRange) Reset()

func (*DateTimeRange) String

func (x *DateTimeRange) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL