Commit f0326741 authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov

рефакторинг.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59712 954022d7-b5bf-4e40-9824-e11837661b57
parent 142ba112
......@@ -78,11 +78,11 @@ function diffDate( d1, d2, mode ) {
case DayCountBasis.Actual360:
var dayDiff = d2 - d1;
dayDiff /= c_msPerDay;
return new cNumber( dayDiff );
return new cNumber( (d2 - d1)/c_msPerDay );
case DayCountBasis.Actual365:
var dayDiff = d2 - d1;
dayDiff /= c_msPerDay;
return new cNumber( dayDiff );
return new cNumber( (d2 - d1)/c_msPerDay );
case DayCountBasis.Europ30_360:
return new cNumber( GetDiffDate360( date1, month1, year1, date2, month2, year2, false ) );
default:
......
......@@ -3712,38 +3712,6 @@ parserFormula.prototype = {
},
/* Сборка функции в инфиксную форму */
/*assemble:function (rFormula) {*//*При сборке формул вида A1+A2+A3 формула получает вид (A1+A2)+A3. Добавить проверку приоритета операций.*//*
if ( !rFormula && this.outStack.length == 1 && this.outStack[this.outStack.length-1] instanceof cError ) {
return this.Formula;
}
var elemArr = [],
stack = [];
for ( var i = 0; i < this.outStack.length; i++ )
stack[i] = this.outStack[i];
var currentElement = null;
while ( stack.length != 0 ) {
currentElement = stack.shift();
if ( currentElement.type == cElementType.operator || currentElement.type == cElementType.func ) {
var arg = [];
for ( var ind = 0; ind < currentElement.getArguments(); ind++ ) {
arg.unshift( elemArr.pop() );
}
elemArr.push( currentElement.Assemble( arg ) );
}
else {
if ( currentElement instanceof cString ) {
currentElement = new cString( "\"" + currentElement.toString() + "\"" );
}
elemArr.push( currentElement );
}
}
var res = elemArr.pop();
if ( res != undefined && res != null )
return res.toString();
else
return this.Formula;
},*/
assemble:function ( rFormula ) {
if ( !rFormula && this.outStack.length == 1 && this.outStack[this.outStack.length - 1] instanceof cError ) {
return this.Formula;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment