google_proto

package
v2.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

func SetTimeZone

func SetTimeZone(location *time.Location)

Types

type Date

type Date struct {

	// Year of date. Must be from 1 to 9999, or 0 if specifying a date without
	// a year.
	Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"`
	// Month of year. Must be from 1 to 12.
	Month int32 `protobuf:"varint,2,opt,name=month,proto3" json:"month,omitempty"`
	// Day of month. Must be from 1 to 31 and valid for the year and month, or 0
	// if specifying a year/month where the day is not significant.
	Day int32 `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"`
	// contains filtered or unexported fields
}

Represents a whole calendar date, e.g. date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a year and month where the day is not significant, e.g. credit card expiration date. The year may be 0 to represent a month and day independent of year, e.g. anniversary date. Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`.

func TimeToDate

func TimeToDate(t time.Time) *Date

func (*Date) AsTime

func (d *Date) AsTime() time.Time

func (*Date) Descriptor deprecated

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

Deprecated: Use Date.ProtoReflect.Descriptor instead.

func (*Date) GetDay

func (x *Date) GetDay() int32

func (*Date) GetMonth

func (x *Date) GetMonth() int32

func (*Date) GetNextDate

func (d *Date) GetNextDate() time.Time

func (*Date) GetYear

func (x *Date) GetYear() int32

func (*Date) ProtoMessage

func (*Date) ProtoMessage()

func (*Date) ProtoReflect

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

func (*Date) Reset

func (x *Date) Reset()

func (*Date) String

func (x *Date) String() string

Jump to

Keyboard shortcuts

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