Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Time Ago Formatter calculates the duration between two input dates from (the same List) with different methods to be chosen from.

Plugin Information

Plugins Available in the Bundle:

  1. Time Ago Datalist Formatter

This plugin bundle is compatible with Joget DX 7 and onwards.

Expected Outcome

The user is able to calculate duration between two dates in the same list.

Image Added

Figure 1: Time Ago Datalist Formatter in List

Get Started

Steps

1. You can get the plugin jar file from Joget Marketplace.

2. Upload the plugin jar file in Joget by going to Settings → Manage Plugins.

3. You can choose to import the demo app or create the app from scratch.

Steps for importing demo app

1. Download the demo app from Download Demo App.

2. Go to Joget Home or All Apps and click on Import App to import the downloaded demo app.

Steps for creating app from scratch

1. Create a form with a Date Picker field.

Image Added

Figure 2: Create Form with Date Picker


2. Go to right up corner, click on Generate App > Generate CRUD

Image Added

Figure 3: Generate CRUD for form


3. Now go to the datalist. Play around with the plugin by duplicating the column and applying the Time Ago Datalist Formatter. For plugin configuration details, please refer to Time Ago Formatter Properties.

Image Added

Figure 4: Modify list and apply Time Ago Datalist Formatter 


4. Publish and run the UI. You can see the difference of the dates that you configured.

Image Added

Figure 5: Time Ago Datalist Formatter in UI List


5. (Optional) Specify the Date Format configuration "yyyy/MM/dd" to be able to pick up the manual date format when processing.

Image Added

Figure 6: Time Ago Datalist Formatter in List (Date Format config)


6. Now the plugin is able to pick up manual dtae format and process the value.

Image Added

Figure 7: Date Format config processing

Time Ago Formatter Properties

Configure Time Ago Formatter

...

Image Added

Figure 8: Time Ago Datalist Formatter Configuration

NameDescription
Duration

Different methods of taking in two dates.

Available options:

  • From Column Date To Today
  • From Column Date To Another Date
  • Between Two Dates
Target Date

A different column date taken in as one of the input dates to be compared with the existing Column Date.

Only appears when Duration is selected as the From Column Date to Another Date option.

Image Modified

Figure 9: Time Ago Datalist Formatter (From Column Date to Another Date)

From Date

A different column date taken in as one of the input dates to be compared with To Date.

Only appears when Duration is selected as the Between Two Dates option.

Image Modified

Figure 10: Time Ago Datalist Formatter (Between Two Dates)

To Date

A different column date taken in as one of the input dates to be compared with From Date.

Only appears when Duration is selected as the Between Two Dates option.

Image Modified

Date Output Format

Multi select box for date output formats for specific units.

Available options:

  • year(s)
  • month(s)
  • day(s)
  • hour(s)
  • minute(s)
Include Format in Output

Checkbox field to determine whether to include format when date output format is chosen.

Extra Date Time Format Processing

Heading. For this section, date time default formats will be applied automatically, only specify if there are any extra formats. Formats should be separated by comma, e.g: yyyy-MM-dd, dd-MM-yyyy

Date Time Format

Default format: "yyyy-MM-dd hh:mm a", "yyyy-MM-dd HH:mm", "yyyy-MM-dd HH:mma", "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", "yyyy-MM-dd'T'HH:mm:ss", "dd-MM-yyyy hh:mm a", "dd-MM-yyyy hh:mma", "dd-MM-yyyy HH:mma", "dd-MM-yyyy HH:mm"

Date Format

Default format: "yyyy-MM-dd", "MMMMMMMMM dd, yyyy", "dd-MM-yyyy"

Time Format

Default format: "hh:mm a", "hh:mma", "h:mm a", "h:mma"

Download Demo App