Xafari Object Formatter. Getting Started

Let's сonsider how to organize the output of DateTime values to strings in the following formats.

  • the number of the month ("may 1")
  • for dates from a week ago show: "a week ago"

Open existing solution or create a new once. Add Xafari.BC Module to Module Project. To obtain a result in the required format, apply XafariObjectFormatter.Format as follows:

  • example

XafariObjectFormatter.Format({0: dateObject, dd MMMM}, this);
 XafariObjectFormatter.Format({0: @WeekAgo, dd.MM.yy}, this);

Run application and see the result.