tim

package module
v0.0.0-...-5a432f2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

README

TIM

Small time input library for GoLang

TIM aims to provide an handful parser that parses legit RFC3339 time such that 1991-08-06T16:56:20+02:00 but also accepts some other forms such that:

  • 1991-08-06T16:56:20, means August 6th, 1991 at 16:56:20, according to the current time zone
  • now, local time on the current computer (with local timezone)

It also allows parse time specified with simple shift operations, such that:

  • 1991-08-06T16:56:20+02:00-12h, means 12 hours before August 6th, 1991 at 16:56:20 GMT+2.
  • now-1w1d, one week and a day ago

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func ParseTim

func ParseTim(t string) (time.Time, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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