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 :
Div | Detail |
---|---|
SyroCalendar_SeasonName_Mal | Seasonal name in Malayalam |
SyroCalendar_SeasonName_Eng | Seasonal name in English |
SyroCalendar_SeasonName_Man | Seasonal name in Manglish |
SyroCalendar_SeasonName_Syr | Seasonal name in Syrian (Suriyani) |
SyroCalendar_SeasonName_Syr_Eng | English Transliteration of the Syrian Name |
SyroCalendar_SeasonWeek_Eng | Seasonal Week Number in English |
SyroCalendar_SeasonWeek_Mal | Seasonal 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 :
Div | Detail |
---|---|
EasterDate | Easter Date when the Liturgical Year Began |
EasterDate_Next | Easter Date when the Next Liturgical Year Begins |
EasterDay | Current Liturgical Year Easter Day |
EasterDay_Next | Next Liturgical Year Easter Day |
InputDate | The Date for which the Result was retrieved for |
InputDay | The Day for which the Result was retrieved for |
SeasonID | Season ID – Refer to the Constant Values Page |
SeasonDate_Start | Start Date of the Current Liturgical Season |
SeasonDate_End | End Date of the Current Liturgical Season |
SeasonDay_Start | Start Day of the Current Liturgical Season |
SeasonDay_End | End Day of the Current Liturgical Season |
SeasonName_Eng_Full | Full Name of the Season in English |
SeasonName_Mal_Full | Full Name of the Season in Malayalam |
SeasonName_Man_Full | Full Name of the Season in Manglish |
SeasonName_San_Full | English Transliteration of the Syrian Name |
SeasonName_Syr_Full | Full Name of the Season in Syrian (Suriyani) |
WeeksNumber | Week Number in the Current Season |
WeeksNumber_Eng | Week Number with Day in English |
WeeksNumber_Mal | Week Number with Day in Malayalam |
LinkURL | URL 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)