jdtojewish

FunctionParams and return types changed in PHP 8.0

Converts a Julian day count to a Jewish calendar date.

PHP 5
PHP 7
PHP 8.0
Improved
PHP 8.1
PHP 8.2-8.3
PHP 8.4
PHP 8.5
PHP 8.6

jdtojewish Function synopsis

jdtojewish(
    int $julian_day,
    bool $hebrew = false,
    int $flags = 0
  ): string

Parameters

$julian_day

Typeint

A julian day number as integer

$hebrew

OptionalTypeboolDefault valuefalse

If the $hebrew parameter is set to true, the $flags parameter is used for Hebrew, ISO-8859-8 encoded string based, output format.

$flags

OptionalTypeintDefault value0

A bitmask which may consist of CAL_JEWISH_ADD_ALAFIM_GERESH, CAL_JEWISH_ADD_ALAFIM and CAL_JEWISH_ADD_GERESHAYIM.

Return value

Typestring

The Jewish date as a string in the form "month/day/year", or an ISO-8859-8 encoded Hebrew date string, according to the $hebrew parameter.

Changes to the jdtojewish Function

PHP 8.0

  • Return type added: string
  • Parameter name of parameter #1 changed: $juliandaycount to $julian_day
  • Parameter type added for parameter #1 ($julian_day): int
  • Parameter type added for parameter #2 ($hebrew): bool
  • Parameter default value added for position #2 ($hebrew): false
  • Parameter name of parameter #3 changed: $fl to $flags
  • Parameter type added for parameter #3 ($flags): int
  • Parameter default value added for position #3 ($flags): 0
  jdtojewish(
-     $juliandaycount,
+     int $julian_day,
-     $hebrew,
+     bool $hebrew = false,
-     $fl
+     int $flags = 0
-   )
+   ): string

jdtojewish Function Availability

PHP VersionAvailability
PHP 8.6Upcoming Release Yes
PHP 8.5Supported (Latest) Yes
PHP 8.4Supported Yes
PHP 8.3Security-Fixes Only Yes
PHP 8.2Security-Fixes Only Yes
PHP 8.1Unsupported Yes
PHP 8.0Unsupported Yes
PHP 7.4Unsupported Yes
PHP 7.3Unsupported Yes
PHP 7.2Unsupported Yes
PHP 7.1Unsupported Yes
PHP 7.0Unsupported Yes
PHP 5.6Unsupported Yes
PHP 5.5Unsupported Yes
PHP 5.4Unsupported Yes
PHP 5.3Unsupported Yes