timeutil

package
v0.0.0-...-e39a43b Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const FormatLayout = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

func Format

func Format(time time.Time, layout string) string

Format returns a textual representation of the time value formatted according to layout, which defines the format by showing how the reference time Example Format(time.Now(), "YYYY-MM-DD HH:mm:ss")

layout defined by:

  1. YYYY = 2006,YY = 06
  2. MM = 01, MMM = Jan,MMMM = January
  3. DD = 02,
  4. DDD = Mon,DDDD = Monday
  5. HH = 15,hh = 03, h = 3
  6. mm = 04, m = 4
  7. ss = 05, m = 5

Types

type Item

type Item struct {
	Go  string
	Std string
}

Jump to

Keyboard shortcuts

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