Documentation ¶
Index ¶
- func DiffDays(a, b time.Time) int64
- func EuropeMadrid() *time.Location
- func Format(t time.Time, locale, layout string) string
- func ParseDate(date *pbdatetime.Date) time.Time
- func ParseTimestamp(timestamp *pbtimestamp.Timestamp) time.Time
- func SerializeDate(t time.Time) *pbdatetime.Date
- func SerializeTimestamp(t time.Time) *pbtimestamp.Timestamp
- func TimeToDate(t time.Time) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EuropeMadrid ¶ added in v1.32.0
func Format ¶
Format returns a textual representation of the time value formatted according to layout, which defines the format by showing how the reference time, defined to be
Mon Jan 2 15:04:05 2006
would be displayed if it were the value; it serves as an example of the desired output. The same display rules will then be applied to the time value.
Predefined layouts ANSIC, UnixDate, RFC3339 and others describe standard and convenient representations of the reference time. For more information about the formats and the definition of the reference time, see the documentation for ANSIC and the other constants defined by this package.
func ParseDate ¶
func ParseDate(date *pbdatetime.Date) time.Time
ParseDate converts a proto to Go time.Time.
func ParseTimestamp ¶
func ParseTimestamp(timestamp *pbtimestamp.Timestamp) time.Time
ParseTimestamp converts a proto to Go time.Time.
func SerializeDate ¶
func SerializeDate(t time.Time) *pbdatetime.Date
SerializeDate converts a Go time.Time to proto considering only the date part.
func SerializeTimestamp ¶
func SerializeTimestamp(t time.Time) *pbtimestamp.Timestamp
SerializeTimestamp converts a Go time.Time to proto.
Types ¶
This section is empty.