Deletes a date format from the database.
$date_format_id: The date format ID.
function system_date_format_delete($date_format_id) {
$format_id = 'formats.' . $date_format_id;
config('system.date')
->clear($format_id)
->save();
// Clean up the localized entry if required.
foreach (language_list() as $langcode => $data) {
$config = config('locale.config.' . $langcode . '.system.date');
if ($config
->get($format_id)) {
$config
->clear($format_id)
->save();
}
}
}