time

package
v0.0.0-...-96fae21 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(layout Layout, t gotime.Time) (string, error)

Format converts time.Time into string representation defined by smpp predefined layout.

func Parse

func Parse(in []byte) (gotime.Time, error)

Parse converts bytestring representation of time from SMPP format to standard time.Time. Relative layouts will be added to the current time and returned as time.Time.

Types

type Layout

type Layout int

Layout defines SMPP time layout in string representation. It can be Relative, Absolute, Simple.

const (
	// SimpleSeconds layout in seconds YYMMDDhhmmss.
	SimpleSeconds Layout = iota
	// SimpleMinutes layout in minutes YYMMDDhhmm.
	SimpleMinutes
	// Absolute layout YYMMDDhhmmsstnn[+-].
	Absolute
	// Relative layout YYMMDDhhmmss000[R].
	Relative
)

Jump to

Keyboard shortcuts

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