indigoxela's picture

Hi,

this is rather a development question:

In Drupal 7 it was possible to provide custom date formats with hook_date_format_types / hook_date_formats. How is this done in Backdrop?

Many thanks for any helpful hint.

 

Comments

indigoxela's picture

Never mind, I figured it out.

In hook_install() of your module define the appropriate array (name, label, pattern, module, hidden) and add it to default date settings with: system_date_format_save($date_format)

Then add hook_uninstall() to remove the formats when the module is uninstalled.

I guess, my question is answered. ;)