Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fredsted committed Sep 25, 2024
1 parent 9c87bd9 commit d1afca6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/custom-actions/action-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,13 @@ Code executed with the Webhook.site JavaScript action runs in a sandbox where th
const createClient = require('supabase')
const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key')
```
* [`moment`](https://momentjs.com/docs) - Date and Time library
```javascript
const moment = require('moment')
const startOfLastWeek = moment().subtract(1, 'weeks').startOf('isoWeek').startOf('day').format();
console.log(startOfLastWeek)
// 2024-09-16T00:00:00+02:00
```

Do you need a library that isn't listed here? Please <a href="https://support.webhook.site">contact support</a>!

Expand Down
4 changes: 4 additions & 0 deletions docs/news.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Subscribe below to receive updates about improvements and new features on Webhoo
</form>
</div>

## 25 September 2024

* `moment` library added to the JavaScript Custom Action. [More info here](/custom-actions/action-types.html#utility-modules)

## 10 September 2024

* When creating a date variable using the Set Variable action, it's now possible to specify an output timezone format.
Expand Down

0 comments on commit d1afca6

Please sign in to comment.