<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 1/10/2019
//
	// Get Jewish date
	$julian_date = gregoriantojd($_REQUEST['month'], $_REQUEST['day'], $_REQUEST['year']);
	$jewishdate = jdtojewish($julian_date);
	// Find the Jewish calendar date and parse out the day and year values
	list ($jc_month, $jc_day, $jc_year) = explode ('/', $jewishdate);
	// Find the Jewish calendar month name
	$jc_month = jdmonthname ($julian_date, CAL_MONTH_JEWISH);
	
	if ($_REQUEST['return_part'] == "day")
		echo $jc_day;
	elseif ($_REQUEST['return_part'] == "month")
		echo $jc_month;
	elseif ($_REQUEST['return_part'] == "year")
		echo $jc_year;
	elseif (!isset($_REQUEST['return_part']) || ($_REQUEST['return_part'] == "all") || ($_REQUEST['return_part'] == ""))
		echo $jewishdate;
	else
		echo -1;
?>