Skip to content

Commit 475f216

Browse files
committed
reference/templates: remove duplicate doc for formatTime
1 parent 1b30920 commit 475f216

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

content/docs/reference/templates/functions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,6 @@ You can use backquotes/ticks to simplify this:`{{reFind "\\d+" (toString 42)}}`
482482
| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
483483
| `currentTime` | Gets the current time, value is of type _time.Time_ which can be used in a custom embed. |
484484
| `formatTime` Time ("layout arg") | Outputs given time in RFC822 formatting, first argument `Time` shows it needs to be of type _time.Time_, also with extra layout if second argument is given - e.g. `{{formatTime currentUserCreated "3:04PM"}}` would output `11:22AM` if that would have been when user was created. Layout argument is covered in [Go time documentation](https://pkg.go.dev/time#pkg-constants). |
485-
| `formatTime` Time ("layout arg") | Outputs given time in RFC822 formatting, first argument `Time` shows it needs to be of type _time.Time_, also with extra layout if second argument is given - e.g. `{{formatTime currentUserCreated "3:04PM"}}` would output `11:22AM` if that would have been when user was created. Layout argument is covered [here](https://pkg.go.dev/time#pkg-constants). |
486485
| `humanizeDurationHours` | Returns given integer (whole number) or _time.Duration_ argument in nanoseconds in human readable format - as how long it would take to get towards given time - e.g. `{{humanizeDurationHours 9000000000000000000}}` returns `285 years 20 weeks 6 days and 16 hours`. More in [Snippets](functions.md#time-sections-snippets). |
487486
| `humanizeDurationMinutes` | Same as `humanizeDurationHours`, this time duration is returned in minutes - e.g. `{{humanizeDurationMinutes 3500000000000}}` would return `58 minutes`. |
488487
| `humanizeDurationSeconds` | Same as both humanize functions above, this time duration is returned in seconds - e.g. `{{humanizeDurationSeconds 3500000000000}}` would return `58 minutes and 20 seconds`. |

0 commit comments

Comments
 (0)