Deprecate passing in month
authoreileen <emcnaughton@wikimedia.org>
Tue, 2 Jan 2024 01:50:08 +0000 (14:50 +1300)
committereileen <emcnaughton@wikimedia.org>
Tue, 2 Jan 2024 01:50:08 +0000 (14:50 +1300)
CRM/Utils/Date.php

index fcb0ec2337821e54a7b4212f3cadc68db8a4a4ad..25348a4154b52697b37e5d7785918daa194abdaf 100644 (file)
@@ -258,7 +258,7 @@ class CRM_Utils_Date {
   /**
    * Return abbreviated month names according to the locale.
    *
-   * @param bool|string $month
+   * @param bool|string $month (deprecated)
    *
    * @return array|string
    *   1-based array with abbreviated month names
@@ -278,6 +278,7 @@ class CRM_Utils_Date {
       ));
     }
     if ($month) {
+      CRM_Core_Error::deprecatedWarning('passing in month is deprecated');
       return \Civi::$statics[__CLASS__][$key][$month];
     }
     return \Civi::$statics[__CLASS__][$key];