MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / NewDDateFromTime

Function NewDDateFromTime

pkg/sql/sem/tree/datum.go:2018–2021  ·  view source on GitHub ↗

NewDDateFromTime constructs a *DDate from a time.Time.

(t time.Time)

Source from the content-addressed store, hash-verified

2016
2017// NewDDateFromTime constructs a *DDate from a time.Time.
2018func NewDDateFromTime(t time.Time) (*DDate, error) {
2019 d, err := pgdate.MakeDateFromTime(t)
2020 return NewDDate(d), err
2021}
2022
2023// ParseContext provides the information necessary for
2024// parsing dates.

Callers

nothing calls this directly

Calls 2

MakeDateFromTimeFunction · 0.92
NewDDateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…