diff --git a/docs/custom-actions/action-types.md b/docs/custom-actions/action-types.md index b72d56e..78c0b6f 100644 --- a/docs/custom-actions/action-types.md +++ b/docs/custom-actions/action-types.md @@ -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 contact support! diff --git a/docs/news.markdown b/docs/news.markdown index 1cc5718..a8fbdce 100644 --- a/docs/news.markdown +++ b/docs/news.markdown @@ -22,6 +22,10 @@ Subscribe below to receive updates about improvements and new features on Webhoo +## 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.