Calculate Renewal Date with addmonths()

jQuery/JavaScript Date Math Demo

Kint Debug Video Follow-up

When I recorded the Kint debugger video the other night, I mentioned that I was calculating subscription transaction renewal dates with jQuery. This is for the Sole Proprietor Expense Tracking application I'm building.

I've written this application for myself primarily because I don't need a full blown accounting system, especially after QuickBooks locked my laptop database after I let my upgrade subscription expire. Spending so much for their subscription annually wasn't possible during the pandemic and subsequent difficult times.

My business is a single-member LLC with a dedicated in-home office and media production studio that produces 100% of business income. This is a common tax reality for many WordPress developers striving in the digital age that live in the United States and whose streams of income flow through to their Schedule C forms on their personal 1040's.

This is my business accounting reality and the Sole Proprietor Expense Tracking App is my answer to solving my true business accounting needs when it comes to filing my personal income taxes, especially if you file your taxes yourself just as I do.

This application makes my tax filing easier. For me it's a need, if you want to use it for yourself when it's available, you'll need to pay for it. It will be available as a downloadable application in the Formidable Masterminds Store.

Demo

How to Use

  1. Select a purchase date
  2. Select "Subscription" for Purchase Type
  3. Select a Subscription Type to calculate renewal date.
  4. If you receive a "NaN/NaN/NaN" error in renewal date, return to Step 1.
Date Math Demo

Data Definition

The data definition is generated in real time by the Formidable Form/Field Keys Easy Display/Edit Shortcode available in the Formidable Masterminds Store.

Form Name
ID
Key
Field Count
Date Math Demo
53
date-math-demo
5
Field Name
ID
Key
Type
Purchase Date
636
dtmthdemo_purchase_date
date
Purchase Type
641
dtmthdemo_purchase_type
select
Subscription Type
642
dtmthdemo_subscription_type
select
Renewal Date
643
dtmthdemo_renewal_date
date
Submit
644
dtmthdemo_submit
submit

Source Code

To be technical, this jQuery code is actually a combination of jQuery/JavaScript. I found the addmonths() JavaScript function on StackExchange and it works beautifully with Formidable Form's date field.

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *