monthCountFromTibetan static method
COUNT MONTH FROM TIBETAN DATE
Implementation
static monthCountFromTibetan(Map<String, Object> _a) {
int year = _a['year'] as int;
int month = _a['month'] as int;
bool isLeapMonth = _a['isLeapMonth'] as bool;
/// the formulas on Svante's paper use western year numbers
var wYear = year - YEAR_DIFF;
var solarMonth = 12 * (wYear - YEAR0) + month - MONTH0;
var hasLeap = isDoubledMonth(year, month);
var isLeap = hasLeap && isLeapMonth ? 1 : 0;
return ((67 * solarMonth + BETA_STAR + 17) / 65).floor() - isLeap;
/// return Math.floor((12 * (year - Y0) + monthObject.month - ALPHA - (1 - 12 * S1) * isLeap) / (12 * S1));
}