date

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package date contains logic for handling operations on datetime values.

Index

Constants

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

DefaultFormat is the datetime format used across the provider.

Variables

View Source
var ErrDateFormat = errors.New("unable to parse date")

ErrDateFormat is returned when there is an error parsing a string date.

Functions

func Parse

func Parse(value string) (time.Time, error)

Parse parses the given string datetime using the default DefaultFormat format.

func ParseFormat

func ParseFormat(format, value string) (time.Time, error)

ParseFormat parses the given string datetime using the provided format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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