code: function(months) {
  
      var parts, days, result;
  
      // year's birth (Molad) distance than the sunday before first Rosh Hashana
      parts = months * MONTH_LENGTH + 31524;
      result = days = Math.floor(modulo(parts, 181440) / DAY_LENGTH);
      parts = modulo(parts, DAY_LENGTH);
  
      // 'MOLAD ZAKEN'
      if(parts >= 19440) {
        result++;
      }
  
      // 'LO ADU ROSH'
      if([0,3,5,7].indexOf(result) + 1) {
        result++;
      }
  
      if(result == days) {
        
        // 'GETRED'
        if(result == 2 && parts >= 9924 && !isLeap(months2year(months))) {
          result += 2;
        }
  
        // 'BETUTAKPAT'
        else if (result == 1 && parts >= 16789 && isLeap(months2year(months) - 1)) {
          result++;
        }
  
      }
  
      return Math.floor((months * MONTH_LENGTH + 31524) / DAY_LENGTH) + result - days;
  
    }
docs: months - till the beginnig of year
  returns days till the beginnig of year
   TODO: improve this function - structure and line length