month — current month.

Description:

u32 month();

Returns the current month.

Return values:

Returns the current month of the year. The numbering of months starts from 0 (0 – January, 1 – February, 11 – December).

Example:

<!-- Example 1 -->
<item addr="524:248" name="Test for month function" type="script">
V-ID/V-ADDR {
        	if(opt0()) {
                    	u8 Month = month();
                    	u8 strForMess[70] = {1, "Now"};
                    	if(Month == 0) {
                               	strcat(strForMess, "January!");
                    	}
                    	if(Month == 1) {
                               	strcat(strForMess, "February!");
                    	}
                    	if(Month == 2) {
                               	strcat(strForMess, "March!");
                    	}
                    	if(Month == 3) {
                               	strcat(strForMess, "April!");
                    	}
                    	if(Month == 4) {
                               	strcat(strForMess, "May!");
                    	}
                    	if(Month == 5) {
                               	strcat(strForMess, "June!");
                    	}
                    	if(Month == 6) {
                               	strcat(strForMess, "July!");
                    	}
                    	if(Month == 7) {
                               	strcat(strForMess, "August!");
                    	}
                    	if(Month == 8) {
                               	strcat(strForMess, "September!");
                    	}
                    	if(Month == 9) {
                               	strcat(strForMess, "October!");
                    	}
                    	if(Month == 10) {
                               	strcat(strForMess, "November!");
                    	}
                    	if(Month == 11) {
                               	strcat(strForMess, "December!");
                    	}
                    	setStatus(@exciterId():32, &strForMess);
                    	setStatus(V-ADDR, 0);
        	}
}
</item>
 
V-ID/V-ADDR 
{
	if(opt0())
	{ 
		u8 strOfMonth[] ="JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecembe";
		u16 sttOfcount[] = {12, 1214, 2608, 3412, 4606, 5208, 6008, 6812, 8016, 9614, 11012, 12214}; 
		u8 Month = month();
		u16 count = (sttOfcount[Month] / 100);
		u16 countOfLetters = (sttOfcount[Month] % 100); 

		u8 strForMess[70];
		sprintf(strForMess, "%cNow %.*s!", 4, countOfLetters, &strOfMonth + count);
		setStatus(@exciterId():32, &strForMess);
		setStatus(V-ADDR, 0);
	}
}

</item>

The result of performing the example in the interface:

Both in the first and second exampled the result of clicking the element script the message with current month will appear in the interface.