Plugin Mode

Calculate Years and Months from Date

Summary

Click the button to calculate the number of years and months between a start date and an end date, and set the results into their respective fields.

Smartphone support

This plugin does not support smartphones. Use it on a computer.

How to use

Set the start and end dates, destination fields for years and months, treatment of days within a month, and button label. Click the button in the start-date field on a record creation, edit, or details page. The plugin writes the number of years and the remainder of the calculated total months divided by 12 to their respective fields. On a details page, it reloads the page after writing the results.

When it runs

Depending on the settings, this customization runs at the following times. Any configured conditions are also evaluated.

  • When you open a record creation, edit, or details page
  • When you click a button added by this plugin

Click the button added by this customization to run the operation.

The page-display and field-change triggers exclude inline editing from the pencil icon on the list page.

Parameters

Enter or select a value for each setting unless it is marked optional.

Button Label

Enter the label for the calculation button added to the start-date field.

Initial value: 年月を算出

Start Date

Please select a start date.

The following field types can be selected.

  • Date
  • Date and time

End Date

Please select a end date.

The following field types can be selected.

  • Date
  • Date and time

Fields to Set (Number of Years)

Choose the field for the calculated number of years.

The following field types can be selected.

  • Text
  • Number
  • Text area
  • Rich text

Fields to Set (Number of Months)

Choose the field for the remainder of the calculated total months divided by 12.

The following field types can be selected.

  • Text
  • Number
  • Text area
  • Rich text

Treatment of Dates Within a Month

Choose how to handle days that do not make up a full month.

Available options:

  • Ignore the day of the month
  • Consider the day of the month

Initial value: Consider the day of the month

Restrictions

Specify different values for “Start Date” and “End Date”.

Specify different values for “Fields to Set (Number of Years)” and “Fields to Set (Number of Months)”.

The following actions and conditions are useful when building similar behavior in customization mode.

Actions

Conditions