Elapsed Time With Exclusions
This action determines how much time has passed since a specified date, with optional filters for excluding weekends, bank holidays and custom dates. It supports all standard time units (years, months, weeks, days, hours, minutes, seconds), but the exclusion filters are applied only when unit is "days".
Bank holidays are sourced from the date-holidays NPM package. Supported countries and holiday types can be found in their documentation. Currently reliable for the UK (GB
) and some other countries, but not guaranteed globally.
The result includes (counts) today, but not start day.
For examples:
If today's date is 2025-05-21
and the input date is 2025-05-03
:
- Default (no exclusions):
18
- Exclude bank holidays (GB):
17
(2025-05-05 is a bank holiday in UK) - Exclude weekends:
13
Action Inputs
Name | Type | Description |
---|---|---|
time_unit | String | Unit of time to return. Exclusion filters apply only when unit is "days" . |
date | String | Start date in ISO 8601 format (YYYY-MM-DD ). |
exclude_weekends | Optional Boolean | If true , skips Saturdays and Sundays. |
exclude_just_sundays | Optional Boolean | If true , skips only Sundays. |
exclude_bank_holidays | Optional Boolean | If true , skips bank holidays in the given country_code . Requires country_code . |
country_code | Optional String | Country code in ISO 3166-1 alpha-2 format (e.g., "GB" , "US" ). |
custom_holidays | Optional List | Dates in YYYY-MM-DD format to exclude as custom holidays. |
Action Outputs
Name | Type | Description |
---|---|---|
success | Boolean | Indicates if the action completed successfully. |
time_past | Number | Number of days passed, adjusted for exclusions. |
Updated about 7 hours ago