Enable AP date/time formatting site-wide in LiveWhale 2.9.0+

Accepted values: true/false

Context: Global (client/global.config.php)

In LiveWhale 2.9.0+ you can use AP Style date/time formatting sitewide by adding this to livewhale/client/global.config.php:

$_LW->CONFIG['USE_AP_STYLE'] = true; // Use AP style date and time formatting site-wide

This will make the following changes to all calendars, details pages, widgets, and API results:

  • Abbreviate certain month names—Jan., Feb., Aug., Sept., Oct., Nov., and Dec.—when used with a date. (When used with only a year, don’t abbreviate.)
  • Use a.m./p.m. instead of am/pm
  • Remove :00 when listing times (e.g., 2 pm)
  • Use noon/midnight instead of 12 p.m./12 a.m.
  • Don’t repeat the same a.m./p.m. in a time range (e.g., 4:30 – 6 p.m.)
  • Remove leading zeroes from date/month when used in date format
  • Add comma after date when format includes full date (e.g., January 1, 2024)

Certain cases (for instance, UTC timestamps in API results) will bypass the use of AP Style in order to preserve functionality.