Documentation
¶
Overview ¶
Package datetime handles specific date and time processing for Discord.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
Convert an input string with ISO timestamps into one that uses Unix timestamps.
Example ¶
package main
import (
"fmt"
"bitbucket.org/idomdavis/etbot/datetime"
)
func main() {
fmt.Println(datetime.Convert(`A sample set of timestamps to convert:
Event A <t:1234567890:R>
Event B <t:2021-12-20T13:14:04+00:00:D>
Event C <t:2021-12-20T13:14:04Z>
Event D <t:2021-12-20T12:14:04-01:00>
Event E <t:Monday>`))
}
Output: A sample set of timestamps to convert: Event A <t:1234567890:R> Event B <t:1640006044:D> Event C <t:1640006044> Event D <t:1640006044> Event E [Time TBC]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.