Documentation
¶
Overview ¶
Package datetime implements marshalling of Go DateTime values into Noms structs with type DateTimeType.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DateTimeType = types.MakeStructTypeFromFields("DateTime", types.FieldMap{ "secSinceEpoch": types.NumberType, })
DateTimeType is the Noms type used to represent date time objects in Noms. The field secSinceEpoch may contain fractions in cases where seconds are not sufficient.
Functions ¶
This section is empty.
Types ¶
type DateTime ¶
DateTime is an alias for time.Time that allows us to marshal date time to Noms.
func (DateTime) MarshalNoms ¶
MarshalNoms makes DateTime implement marshal.Marshaler and it makes DateTime marshal into a Noms struct with type DateTimeType.
func (DateTime) MarshalNomsType ¶
MarshalNomsType makes DateTime implement marshal.TypeMarshaler and it allows marshal.MarshalType to work with DateTime.
Click to show internal directories.
Click to hide internal directories.