SIGN IN SIGN UP

feat: Add Runtime Formula for formatting numbers (#5262)

* Add new skill for creating/updating runtime formulas.

* Add abs() formula function

* Add getErrorMessage() to arg type to return a human-readable error message.

* Update skill to ensure getErrorMessage() is overridden when appropriate.

* Add null() runtime formula.

* Add number_format() runtime formula.

* Fix tests

* Add changelog entry

* Add date_interval() runtime formula.

* Fix test

* Add runtime formula: to_datetime()

* Update changelog

* Fix backend test

* Fix frontend test

* Add new ensure_date_interval() ensurer.

* Update descriptions and examples.

* Remove references to Moment.js

* Refactor validate_type_of_args() to return the index of the invalid arg.

* Refactor to_datetime() to use ensure_datetime()

* Use ensure_date_interval ensurer for IntervalStringBaserowRuntimeFormulaArgumentType

* Update skill with sections on ensurers.

* Add optional strict arg to ensure_datetime()

* Fix tests

* Simplify the ensure_string() to return total seconds for timedelta.

* ensure_date_interval() should also try to convert numbers to a timedelta.

* Fix test

* Use ensure_integer() in ensure_date_interval()

* Rename DateInterval to Duration

* Return an array of all possible errors.

* Use database duration parser for consistency

* Remove contrib references in core.

* Add additional test coverage

* Rename duration to to_duration

* Attempt to fix CI

* Reverting some changes

* Ensure empty string '' isn't accepted as a datetime format.

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
T
Tsering Paljor committed
87fbf1f2bbc3e17eaafc27de26eed23666a3538d
Parent: fb61bb7
Committed by GitHub <noreply@github.com> on 5/26/2026, 7:47:13 AM