Knap.md
LogicFiltersVariablesAPIGitHub ↗

Guide

VariablesLogicFilters

Reference

API

Project

GitHub ↗npm ↗

date_modify

Add or subtract a date interval.

Filters/date_modify

Syntax

{{ value | date_modify:"+1 day" }}

Example

01

Basic usage

InputTS
1{2  "published": "2024-12-01"3}
TemplateKNAP
1{{ published | date_modify:"+5 days" }}
OutputKNAP
12024-12-06

Behavior

  • Use a signed amount followed by year, month, week, day, hour, minute, or second.

Related filters

dateFormat a date with Day.js format tokens.
Previous← dateNextduration →
Knap is open source under the MIT license.View source ↗

On this page

SyntaxExamplesBehaviorRelated filters
date_modify filter — Knap