Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / date_formats.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/date_formats.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/date_formats.twig
new file mode 100644 (file)
index 0000000..03a92a4
--- /dev/null
@@ -0,0 +1,22 @@
+/**
+ * Implements hook_date_formats().
+ */
+function {{ machine_name }}_date_formats() {
+  return array(
+    array(
+      'type' => 'mymodule_extra_long',
+      'format' => 'l jS F Y H:i:s e',
+      'locales' => array('en-ie'),
+    ),
+    array(
+      'type' => 'mymodule_extra_long',
+      'format' => 'l jS F Y h:i:sa',
+      'locales' => array('en', 'en-us'),
+    ),
+    array(
+      'type' => 'short',
+      'format' => 'F Y',
+      'locales' => array(),
+    ),
+  );
+}