Seasonal Info



To get the Seasonal Info (Kaalam) for the day, follow these steps.

 


Link the Script File

Add the below line in the <head> tag of your website.
You only need to add the below line only once per webpage, in case if you have implemented other widgets in the same webpage.

<script src="https://syrocalendar.tk/API/SyroCalendar.min.1.0.2.js"></script>

Place the Div’s

Choose versions of the Seasonal Name you need, and paste it in the <body> tag of your website, where you need the information to be shown.

<div id="SyroCalendar_SeasonName_Mal">Loading...</div>
<div id="SyroCalendar_SeasonName_Eng">Loading...</div>
<div id="SyroCalendar_SeasonName_Man">Loading...</div>
<div id="SyroCalendar_SeasonName_Syr">Loading...</div>
<div id="SyroCalendar_SeasonName_Syr_Eng">Loading...</div>
<div id="SyroCalendar_SeasonWeek_Eng">Loading...</div>
<div id="SyroCalendar_SeasonWeek_Mal">Loading...</div>

Note : Only place the <div>’s you need in your website.



Result

You will receive todays seasonal name in the following div’s :

DivDetail
SyroCalendar_SeasonName_MalSeasonal name in Malayalam
SyroCalendar_SeasonName_EngSeasonal name in English
SyroCalendar_SeasonName_ManSeasonal name in Manglish
SyroCalendar_SeasonName_SyrSeasonal name in Syrian (Suriyani)
SyroCalendar_SeasonName_Syr_EngEnglish Transliteration of the Syrian Name
SyroCalendar_SeasonWeek_EngSeasonal Week Number in English
SyroCalendar_SeasonWeek_MalSeasonal Week Number in Malayalam

HTML Example Code


<html>
<head>
	<title>SyroCalendar Demo - Seasonal Info</title>
	<script src="https://syrocalendar.tk/API/SyroCalendar.min.1.0.2.js"></script>
</head>

<body>
	<div id="SyroCalendar_SeasonName_Mal">Loading...</div>
	<div id="SyroCalendar_SeasonName_Eng">Loading...</div>
	<div id="SyroCalendar_SeasonName_Man">Loading...</div>
	<br>
	<em>Powered by <a href="https://SyroCalendar.tk" target="_blank">SyroCalendar</a></em>
</body>
</html>

Please don’t forget to provide a link to SyroCalendar.tk below the Widget you implemented. It could be as simple as
Powered by SyroCalendar
(If you have multiple widgets on the same page, just 1 link will suffice)



ADVANCED



To get the JSON Data

To get the JSON data (without HTML Elements), make sure you have the Script file in the <head> tag, and call the below JavaScript function. This function returns a JSON Object.

<script>var SeasonalInfo = GetSeasonalInfoJSON();</script>


JSON Result

You will get the following data in the JSON Object :

DivDetail
EasterDateEaster Date when the Liturgical Year Began
EasterDate_NextEaster Date when the Next Liturgical Year Begins
EasterDayCurrent Liturgical Year Easter Day
EasterDay_NextNext Liturgical Year Easter Day
InputDateThe Date for which the Result was retrieved for
InputDayThe Day for which the Result was retrieved for
SeasonIDSeason ID – Refer to the Constant Values Page
SeasonDate_StartStart Date of the Current Liturgical Season
SeasonDate_EndEnd Date of the Current Liturgical Season
SeasonDay_StartStart Day of the Current Liturgical Season
SeasonDay_EndEnd Day of the Current Liturgical Season
SeasonName_Eng_FullFull Name of the Season in English
SeasonName_Mal_FullFull Name of the Season in Malayalam
SeasonName_Man_FullFull Name of the Season in Manglish
SeasonName_San_FullEnglish Transliteration of the Syrian Name
SeasonName_Syr_FullFull Name of the Season in Syrian (Suriyani)
WeeksNumberWeek Number in the Current Season
WeeksNumber_EngWeek Number with Day in English
WeeksNumber_MalWeek Number with Day in Malayalam
LinkURLURL to the Season Explanation

JSON Example Code


<html>
<head>
	<title>SyroCalendar Demo - Seasonal Info</title>
	<script src="https://syrocalendar.tk/API/SyroCalendar.min.1.0.2.js"></script>
</head>

<body>

	<div id="LiturgicalSeason">Loading...</div>

	<script>
	
		var SyroCalendartimer;
		function checkSyroFlag() 
		{
			var SeasonalInfo = GetSeasonalInfoJSON();
			if(!SeasonalInfo.hasOwnProperty('Error'))
			{
				var SeasonalElement =  document.getElementById('LiturgicalSeason');
				if (typeof(SeasonalElement) != 'undefined' && SeasonalElement != null)
				{
					SeasonalElement.innerHTML = SeasonalInfo.SeasonName_Mal_Full + " (" + SeasonalInfo.WeeksNumber_Mal + ")" + "<br>" + SeasonalInfo.SeasonName_Eng_Full + " (" + SeasonalInfo.WeeksNumber_Eng + ")";
				}
				clearTimeout(SyroCalendartimer);
			}
			else{
				SyroCalendartimer = setTimeout(checkSyroFlag, 100); 
			}
		}

		jQuery(window).on('load', function() {
			SyroCalendartimer = setTimeout(checkSyroFlag, 100);
		});
		
	</script>
	<br>
	<em>Powered by <a href="https://SyroCalendar.tk" target="_blank">SyroCalendar</a></em>
</body>
</html>

Please don’t forget to provide a link to SyroCalendar.tk below the Widget you implemented. It could be as simple as
Powered by SyroCalendar
(If you have multiple widgets on the same page, just 1 link will suffice)