Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
4d305d97
Commit
4d305d97
authored
Sep 05, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 35766
parent
9ab91e4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
cell/model/FormulaObjects/dateandtimeFunctions.js
cell/model/FormulaObjects/dateandtimeFunctions.js
+20
-4
No files found.
cell/model/FormulaObjects/dateandtimeFunctions.js
View file @
4d305d97
...
...
@@ -379,10 +379,26 @@
if
(
elem
instanceof
cNumber
)
{
holidays
.
push
(
elem
);
}
else
if
(
elem
instanceof
cString
)
{
var
res
=
g_oFormatParser
.
parse
(
elem
.
getValue
());
if
(
res
&&
res
.
bDateTime
&&
res
.
value
>=
0
)
{
holidays
.
push
(
new
cNumber
(
parseInt
(
res
.
value
)));
}
else
{
var
res
=
elem
.
tocNumber
();
if
(
res
instanceof
cError
||
res
instanceof
cEmpty
)
{
var
d
=
new
Date
(
elem
.
getValue
());
if
(
isNaN
(
d
))
{
d
=
g_oFormatParser
.
parseDate
(
elem
.
getValue
());
if
(
d
===
null
)
{
return
this
.
value
=
new
cError
(
cErrorType
.
wrong_value_type
);
}
res
=
d
.
value
;
}
else
{
res
=
(
d
.
getTime
()
/
1000
-
d
.
getTimezoneOffset
()
*
60
)
/
c_sPerDay
+
(
AscCommonExcel
.
c_DateCorrectConst
+
(
AscCommon
.
bDate1904
?
0
:
1
)
);
}
}
else
{
res
=
elem
.
tocNumber
().
getValue
();
}
if
(
res
&&
res
>
0
){
holidays
.
push
(
new
cNumber
(
parseInt
(
res
)));
}
else
{
return
bIsError
=
new
cError
(
cErrorType
.
wrong_value_type
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment