License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.


To calculate the duration between 2 given dates

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

Screenshot:

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

Code:

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

$('input[name="fromDatepicker"], input[name="toDatepicker"]').change( function(){
      d1 = $('input[name="fromDatepicker"]').datepicker('getDate');
      d2 = $('input[name="toDatepicker"]').datepicker('getDate');
      diff = 0;
      if (d1 && d2) {
            diff = Math.floor((d2.getTime() - d1.getTime()) / 86400000); // ms per day
      }
      $('input[name=days]').val(diff);
});

Sample App Download

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.


Sample App

APP_kb_dx8_calculateDateDiff.jwa