Skip to main content
Version: 3.13.0-beta.87 (Latest)

formatDICOMDate options object

formatDICOMDate (exported from @ohif/ui-next) now takes its optional arguments as a single options object instead of positional parameters.

Before (3.12):

formatDICOMDate(date, 'YYYY-MM-DD');

After (3.13):

formatDICOMDate(date, { strFormat: 'YYYY-MM-DD' });

The available options are:

  • strFormat — explicit output format; overrides the locale's Common:localDateFormat.
  • fallbackFormat — format used only when the active locale doesn't define Common:localDateFormat (defaults to MMM D, YYYY).
  • invalidFallback — value returned for empty/unparseable input; when omitted, the prior lenient behavior is preserved.

Callers that passed only the date argument (including passing formatDICOMDate directly as a formatDate formatter) are unaffected.