Skip to content

Commit b6db845

Browse files
authored
docs/reference: reword time syntax and data explanation (#75)
* docs/reference: reword time syntax and data explanation Signed-off-by: Galen CC <[email protected]> * docs/reference: correct casing in time data docs Signed-off-by: Galen CC <[email protected]> * docs/reference: replace underscore italic markers with asterisks Signed-off-by: Galen CC <[email protected]> --------- Signed-off-by: Galen CC <[email protected]> Signed-off-by: Luca Zeuch <[email protected]>
1 parent 89843be commit b6db845

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

content/docs/reference/templates/syntax-and-data.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -891,9 +891,12 @@ See [`createTicket`](functions#createticket) for creating a ticket.
891891

892892
## Time
893893

894-
Time and duration types use Go's time package library and its methods >
895-
[https://golang.org/pkg/time/#time](https://golang.org/pkg/time/#Time) and also this although slightly different syntax
896-
all applies here > [https://gobyexample.com/time](https://gobyexample.com/time).
894+
Time and duration types use [Go's time package](https://golang.org/pkg/time/#Time). Go by Example lists [some examples
895+
of using *time.Time*](https://gobyexample.com/time) in Go code, which can be referenced for similar use in YAGPDB's
896+
templates.
897+
898+
Some time types in the data that Discord API functions return instead use the *discordgo.Timestamp* type. These can be
899+
converted to *time.Time* with the `.Parse` method. These cases are mentioned in the type documentation on this page.
897900

898901
| **Field** | **Description** |
899902
| ------------- | ----------------------------------------------------------------------------------------------------------- |

0 commit comments

Comments
 (0)