DateTime_PrettyFormat

Stable version 1.0.0 (Compatible with OutSystems 11)
Published on 20 Sep by 
0.0
 (0 ratings)

DateTime_PrettyFormat

Details
This action already exists natively on the Outsystems platform, but it is a server action, and has limitations to use in a reactive application, for example, I converted it into a client action, and it can be used inside a list or table records for example, something that was not possible to use with the native function! Formats a date and time relatively to the current moment.
Read more

Options


  • DateTime: The date to format.
  • FormattedText: Returns the date and time relatively to the current moment.


How its work?

This action already exists natively on the Outsystems platform, but it is a server action, and has limitations to use in a reactive application, for example, I converted it into a client action, and it can be used inside a list or table records for example, something that was not possible to use with the native function!
 
Formats a date and time relatively to the current moment.
 
<= 1 min
    16:08 (just now)
< 24 hours
    16:07 (1 minute ago), 22:09 (in 6 hours)
>=24 hours and <= 1 day
    yesterday, today, tomorrow
<= 30 days
    30 Jul (3 weeks ago), 8 Aug (9 days ago), 27 Aug (in 10 days), 16 Sep (in 4 weeks)
> 30 days
   30 Apr, 20 Oct
The year is different 
    2008/11/30, 2014/03/30
    In this case:
       - It overrides the previous formats except the first one.
        - The date format is as defined in the Service Center.
What’s new (1.0.0)
Reviews (0)