TaxCycle Home | Products | Pricing | Events | Documentation | Support | Blog

Date comparison


#1

I did a search, but haven’t been able to find the answer:

What is the correct syntax in the template editor to create a condition determined by comparison to a coded date and an actual date?

Right now the standard client letter says, “If you reported self-employment income in 2016, your return is not late filed until after June 15th, 2017.”

I want to change that so it says “Since you reported self-employment income in 2016, your return is not late filed until after June 15th, 2017.” and only have it print if the taxpayer or spouse reported self employment income. It seems to me the easiest criterion would be the Info.CommonData.FileByDate field (unless there is a hidden field somewhere I can access that sets that date with a simple binary response). So I need to know how to either determine if the Info.CommonData.FileByDate is greater than April 30, 2017 or determine if it is equal to June 15,2017.


#2

@matthew

Here are a few examples of date comparisons. I looked at this in detail yesterday and made a few improvements to the way this works… those improvements will come next week, and are noted below:

Today is {{ format(today(), “January 02, 2003”) }}

{{# CurrentClient.Info.Filing.SigningDate != date() }}
{{# CurrentClient.Info.Filing.SigningDate = today() }}
Signed today
{{/end}}
{{# CurrentClient.Info.Filing.SigningDate < today() }}
Adding support for “date math” in release the week of March 6th, which works like this:

Signed {{ format(today() - CurrentClient.Info.Filing.SigningDate, “dd”) }} days ago
{{/end}}
{{/end}}

The following code creates a specific date. Note that you must leave spaces after the commas. (the spaces will not be required after the release the week of March 6th).
{{ date(2016, 02, 18) }}

{{# today() > CurrentClient.Info.CommonData.FileByDate }}
You are late.
{{/end}}
{{# today() < CurrentClient.Info.CommonData.FileByDate }}
You are early.
{{/end}}
{{# today() = CurrentClient.Info.CommonData.FileByDate }}
You are just in time.
{{/end}}


#3

Thanks Cameron,

Will the code to create a date accept variables or constants?

For example: {{date(Constants.CurrentTaxationYear+1, 06, 15)}}


#4

@matthew

This works:

{{date(Constants.CurrentTaxationYear+1, 06, 15)}}

The improvements noted in my post above have been included in today’s release.

~ Cameron