Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
metadata:
title: Date as object
documentation: "https://docassemble.org/docs/fields.html#date"
example start: 1
example end: 3
---
question: |
When did you file the complaint?
fields:
- Date: date_of_filing
datatype: date
---
code: |
response_deadline = date_of_filing.plus(days=20)
christmas = response_deadline.replace(month=12, day=25)
---
mandatory: True
question: |
% if christmas > response_deadline:
Your response is due
${ int(date_difference(starting=date_of_filing, ending=christmas).weeks) }
weeks before Christmas.
% else:
Your response is due soon after Christmas!
% endif