Rabbinatix
Sign inGet started
Store

Earliest and latest

FreeLogic
@rabbinatix/earliest-and-latest by Rabbinatixupdated Oct 4, 2026

The earliest and the latest of a list of dates.

Sign in to add

Sort puts the dates in order (ISO date text sorts like the dates it holds), then First Item and Last Item take both ends. An empty list gives null for both.

Shows: Sort, First Item, Last Item.

How to use it

Add it to your logic, then add a Call Function step in any logic and pick Earliest and latest. It belongs to no system, so every system can use it. Or download the TypeScript and call it from your own code.

Inputs
dates: List of texts
Outputs
earliest: Text (may be empty)
latest: Text (may be empty)
Previewdrag the steps around; scroll to zoom
Function Entry, Input / output. 0 inputs, 2 outputs. step 1 of 5
Earliest and latest
dates
Sort, Collection. 1 input, 1 output. step 2 of 5
Sort
array
result
First Item, Collection. 1 input, 1 output. step 3 of 5
First Item
array
item
Last Item, Collection. 1 input, 1 output. step 4 of 5
Last Item
array
item
Return, Input / output. 3 inputs, 0 outputs. step 5 of 5
Return
earliest
latest

Arrow keys: next or previous step in flow order. Alt with arrows: nearest step in that direction. Enter: open. Shift F10: more actions.

100%
Examplesrun live against the logic · 2/2 pass
PassedExampleInputOutput
Three dates{"dates":["2026-03-01","2025-12-24","2026-10-14"]}{"earliest":"2025-12-24","latest":"2026-10-14"}
None{"dates":[]}{"earliest":null,"latest":null}
Try it
Versions
In this package
Earliest and latest (entry)