PHP code example of kawan / gregorian_to_kurdish_calendar

1. Go to this page and download the library: Download kawan/gregorian_to_kurdish_calendar library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kawan / gregorian_to_kurdish_calendar example snippets


    composer 

$date = "2024-03-21";
$format = "Y-d-m";
echo gregorian_to_kurdish($date, $format);

// Example 1
$date = "2024-02-25";
$format = "d-m-Y | F";
echo gregorian_to_kurdish($date, $format);
//output:  "٥-١٢-٢٧٢٣ | ڕەشەمێ" 

// Example 2
$date = "2024-03-21 13:34:15";
$format = "Y - m - d | l | F | a |g:i:s";
echo gregorian_to_kurdish($date, $format);
//output: "٢٧٢٤ - ١ - ١ | ٥ شەمە | نەورۆز | د.ن |١:٣٤:١٥"

    composer 

$date = "2024-03-21";
$format = "Y-d-m";
echo gregorian_to_kurdish($date, $format);

// Example 1
$date = "2024-02-25";
$format = "d-m-Y | F";
echo gregorian_to_kurdish($date, $format);
//output:  "٥-١٢-٢٧٢٣ | ڕەشەمێ" 

// Example 2
$date = "2024-03-21 13:34:15";
$format = "Y - m - d | l | F | a |g:i:s";
echo gregorian_to_kurdish($date, $format);
//output: "٢٧٢٤ - ١ - ١ | ٥ شەمە | نەورۆز | د.ن |١:٣٤:١٥"