Documentation ¶
Overview ¶
Package datetime implements marshalling of Go DateTime values into Noms structs with type DateTimeType.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DateTimeType = types.MakeStructTypeFromFields(datetypename, 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.
var Epoch = DateTime{time.Unix(0, 0)}
Epoch is the unix Epoch. This time is very consistent, which makes it useful for testing or checking for uninitialized values
Functions ¶
func RegisterHRSCommenter ¶
Types ¶
type DateTime ¶
DateTime implements marshaling of time.Time to and from 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.
type DateTimeCommenter ¶
type DateTimeCommenter struct {
// contains filtered or unexported fields
}