ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# `date_modify` New in version 1.9.0: The date_modify filter has been added in Twig 1.9.0. The `date_modify` filter modifies a date with a given modifier string: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>{{ post.published_at|date_modify("+1 day")|date("m/d/Y") }} </pre></div></td></tr></table> The `date_modify` filter accepts strings (it must be in a format supportedby the [strtotime](http://www.php.net/strtotime) [http://www.php.net/strtotime] function) or [DateTime](http://www.php.net/DateTime) [http://www.php.net/DateTime] instances. You can easily combineit with the [*date*](#) filter for formatting. ### Arguments - `modifier`: The modifier