Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    We’ve purchased the Pro Version of the CCF.

    For pro or commercial product support please contact the author directly on their site.

    https://wordpress.dwbooster.com/support

    As the author @codepeople is aware, commercial products are not supported in these forums. As you are their customer I am sure they will have no problem supporting you there.

    Plugin Author codepeople

    (@codepeople)

    Hi,

    In reality you can calculate it with the free version of the plugin too. For example, suppose your form includes two date fields: fieldname1, and fieldname2, and a calculated field.

    The equation in this case would be:

    (function(){
    var d = ABS(fieldname1-fieldname2);
    return FLOOR(d/360)+' years and '+(d%360)+' days';
    })()

    and that’s all.
    Best regards.

    Thread Starter upyria

    (@upyria)

    Thanks for fast response, but we need another issue.
    Here the example:

    fieldname1: 01/03/2016
    fieldname2: 01/03/2017

    fieldname2-fieldname1: 365 days

    We need the calculation between the dates release days in commerciale year notation:

    fieldname1: 01/03/2016
    fieldname2: 01/03/2017

    fieldname2-fieldname1: 360 days

    Once determined the right formula, fieldname2 will be fixed and the Client should change only fieldname1. The formula should calculate the gap between the two dates on a 360 basis.
    The result will be multiplied to calculate a price of an insurance service (tipically furnished on a 360 day base service).

    Hope we’ve explained better the request & hope u can help us.

    Thanks in advance for patience and collaboration.

    Plugin Author codepeople

    (@codepeople)

    Hi,

    I guess you are needing simply to get a proportional value, as follows:

    CEIL(ABS(fieldname1-fieldname2)*360/365)

    I’m sorry, but this question is not really about the plugin. If you need additional help to implement your project, I can offer you a custom coding service through my personal website:

    https://cff.dwbooster.com/customization

    Best regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Date Calculation – Commercial Year 360dd’ is closed to new replies.