datetime

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: BSD-3-Clause Imports: 2 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateTime

type DateTime time.Time

DateTime is an alias for time.Time which implements serialization matching the conjure wire specification at https://github.com/palantir/conjure/blob/master/docs/spec/wire.md

func ParseDateTime

func ParseDateTime(s string) (DateTime, error)

ParseDateTime parses a DateTime from a string. Conjure supports DateTime inputs that end with an optional zone identifier enclosed in square brackets (for example, "2017-01-02T04:04:05.000000000+01:00[Europe/Berlin]").

func (DateTime) MarshalText

func (d DateTime) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler (used by encoding/json and others).

func (DateTime) String

func (d DateTime) String() string

func (*DateTime) UnmarshalText

func (d *DateTime) UnmarshalText(b []byte) error

UnmarshalText implements encoding.TextUnmarshaler (used by encoding/json and others).

Jump to

Keyboard shortcuts

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