Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/content/_shared/handlebars-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sitemapExclude: true
|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `{{REGION}}` | Resolves to the AWS region name, i.e. us-east-1. |
| `{{$UUID}}` | Generates a random UUID/v4, i.e. 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d. |
| `{{$RANDOM_NUMBER}}` | Generates a random decimal number between 0 and 1000, i.e. 345. |
| `{{$RANDOM_NUMBER}}` | Generates a random decimal number between 0 and 10000, i.e. 345. |
| `{{moment}}` | Generates a date or time using **moment.js** and allows for formatting:<br><br> <ul> <li>`{{moment "YYYY-MM-DD"}}` generates a date, i.e. 2020-08-26</li> <li>`{{moment "2 days ago" "YYYY-MM-DD"}}` generates the date two days ago: 2020-08-24</li> <li>`{{moment "last week" "X"}}` generates a UNIX timestamp from last week: 1597924480</li> </ul> |

A practical example of using the `{{moment}}` helper would be setting the pagination options on a typical API endpoint:
Expand Down
Loading