Wed
1
Feb '06
I saw so many of my friends writing long long functions for finding the Quarter a month belongs. like if (month > 1 && month < = 3) && (month > … etc.
Here is a simple function for that.
Here is a simple function for that.
private int getQuarter(int m)
{
return ((m - 1) / 3) + 1 ;
}

Leave a passing comment »