This asset helps you perform advanced date/time operations on the client-side, inside Reactive logic, without needing server round-trips or complex JavaScript coding. Developers can use simple OutSystems actions, such as:
FormatDate
AddDays
AddMonths
IsBefore
IsAfter
FromNow (“5 minutes ago”)
ToNow
ParseUnix
ToUnix
All actions use the Day.js engine behind the scenes, ensuring fast performance and predictable output.
Day.js is a modern JavaScript library designed to be a lightweight alternative to Moment.js. Its core characteristics make it ideal for OutSystems applications:
Very small size (~2 KB) ? faster screen load times
Immutable objects ? safer logic
Chainable API ? clear and expressive date operations
Plugin ecosystem ? includes relative time, duration, timezone, localized formatting, and more
Huge community support ? stable, widely used, trusted
This Forge asset integrates Day.js into OutSystems in a structured, maintainable, and reusable way.
This version introduces updated naming and several new Day.js wrapper functions to improve consistency and extend capabilities.
Renamed: TimeFromNow → FromNow to match official Day.js naming.
TimeFromNow
FromNow
New Functions Added:
AddDay
SubtractDays
Now
All Client Actions now return correct types (DateTime or Text) using .toDate() or .format().
DateTime
Text
.toDate()
.format()
All wrappers are now Function = Yes, allowing direct use in expressions.
Improved internal JS handling and cleanup.
Better plugin support for RelativeTime.
Replace old TimeFromNow calls with FromNow.
Ensure relativeTime plugin is loaded when using FromNow/ToNow.