Documentation ¶
Overview ¶
Package timestamp is a package for making it easier to send timestamps in Discord messages
Index ¶
Constants ¶
View Source
const ( // FormatTypeShortTime will look like the following: 16:20 FormatTypeShortTime = "t" // FormatTypeLongTime will look like the following: 16:20:30 FormatTypeLongTime = "T" // FormatTypeShortDate will look like the following: 20/04/2021 FormatTypeShortDate = "d" // FormatTypeLongDate will look like the following: 20 April 2021 FormatTypeLongDate = "D" // FormatTypeShortDateTime will look like the following: 20 April 2021 16:20 (Default) FormatTypeShortDateTime = "f" // FormatTypeLongDateTime will look like the following: Tuesday, 20 April 2021 16:20 FormatTypeLongDateTime = "F" // FormatTypeRelative will look like the following: 2 months ago FormatTypeRelative = "R" )
Variables ¶
This section is empty.
Functions ¶
func FormatTime ¶
func FormatTime(time time.Time, format FormatType) string
FormatTime returns the time with the given format
Types ¶
type FormatType ¶
type FormatType string
FormatType represents the format type of how it will look like in Discord
Click to show internal directories.
Click to hide internal directories.