hammertime

package
v0.0.0-...-d931726 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package hammertime provides functionailities to format a time.Time into a Discord timestamp mention.

The name was used after the very useful web app hammertime.djdavid98.art.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(t time.Time, f FormatSpec) string

Types

type FormatSpec

type FormatSpec string
const (
	ShortDate      FormatSpec = "d" // 12/12/2020
	LongerDateTime FormatSpec = "f" // December 12, 2020 8:00 AM
	ShortTime      FormatSpec = "t" // 8:00 AM
	LongerDate     FormatSpec = "D" // December 12, 2020
	LongDateTime   FormatSpec = "F" // Saturday, December 12, 2020 8:00 AM
	Span           FormatSpec = "R" // 8 months ago
	LongTime       FormatSpec = "T" // 8:00:00 AM
)

Jump to

Keyboard shortcuts

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