Additional Formulas functions

I think many have encountered situations where certain formulas functions are missing, so I would like to kindly request an expansion of the functionality. For example:

ToDays() workdays
A flag or separate formulas to calculate the number of working days/weekends.

ToDays([End Date] - [Start Date], true) // only counts workdays

Duration strings
Simple duration formatting for better readability in reports and views.

Duration([Start Date], [End Date]).toYears()  // "2 years"
Duration([Start Date], [End Date]).toMonths() // "26 months"
Duration([Start Date], [End Date]).toYearsAndMonths() // "2 years, 2 months"

Pad
Easy number and text padding for consistent formatting.

Pad(5, 3, "0")  // "005"
Pad(42, 4, "0") // "0042"

Round (down/up) to integer
Currently rounds only to decimals

Round(1.23, 0) // 1.0 (impossible to get 1)

At
First() and Last() are good, but what if we need second or second-to-last index?

Contestants.Sort([Score], false).At(0)     // first place
Contestants.Sort([Score], false).At(1)     // second place
Contestants.Sort([Score], false).At(-2)    // second-to-last place

Mod

Mod(5, 3)  // 2 (remainder of 5 / 3)
Mod(15, 7) // 1 (remainder of 15 / 7)

Is In Range
Check if a value (especially dates) falls within a specified range.

IsInRange(Today(), [Start Date], [End Date])  // true if today is between start and end
IsInRange(5, 1, 10)  // true since 5 is between 1 and 10

Split
Split text by a delimiter and access individual parts.

Split("PRJ-123-FEATURE", "-").At(0)  // "PRJ"
Split("PRJ-123-FEATURE", "-").At(1)  // "123"
Split("PRJ-123-FEATURE", "-").Count()  // 3
Split("PRJ-123-FEATURE", "-").Join("/")  // "PRJ/123/FEATURE"
4 Likes