shortrfc3339

package
v0.0.0-...-3371691 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package shortrfc3339 implements helpers for working with shortened RFC-3339 compliant timestamps (those without seconds).

Index

Constants

View Source
const Layout = "2006-01-02T15:04Z"

Layout is the time.Parse compliant parsing string for use when parsing Shortened RFC-3339 compliant timestamps.

Variables

This section is empty.

Functions

This section is empty.

Types

type Timestamp

type Timestamp struct {
	time.Time
}

Timestamp is a custom JSON encoder / decoder for shortened RFC3339-compliant timestamps (those without seconds).

func (*Timestamp) MarshalJSON

func (ct *Timestamp) MarshalJSON() ([]byte, error)

func (*Timestamp) UnmarshalJSON

func (ct *Timestamp) UnmarshalJSON(b []byte) (err error)

func (*Timestamp) UnmarshalXML

func (ct *Timestamp) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

Jump to

Keyboard shortcuts

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