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
cb0b720a
Commit
cb0b720a
authored
Jun 01, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 31395
parent
8ac92461
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
16 deletions
+34
-16
cell/api.js
cell/api.js
+1
-15
cell/model/Serialize.js
cell/model/Serialize.js
+1
-1
cell/model/WorkbookElems.js
cell/model/WorkbookElems.js
+32
-0
No files found.
cell/api.js
View file @
cb0b720a
...
...
@@ -308,21 +308,7 @@ var editor;
if
(
cultureInfo
)
{
var
numFormatDigit
=
AscCommon
.
oNumFormatCache
.
get
(
'
#,##0.00
'
);
var
dateElems
=
[];
for
(
var
i
=
0
;
i
<
cultureInfo
.
ShortDatePattern
.
length
;
++
i
)
{
switch
(
cultureInfo
.
ShortDatePattern
[
i
])
{
case
'
0
'
:
dateElems
.
push
(
'
d
'
);
break
;
case
'
1
'
:
dateElems
.
push
(
'
m
'
);
break
;
case
'
2
'
:
dateElems
.
push
(
'
yyyy
'
);
break
;
}
}
var
formatDate
=
dateElems
.
join
(
'
/
'
);
var
formatDate
=
AscCommonExcel
.
getShortDateFormat
(
cultureInfo
);
formatDate
+=
"
h:mm
"
;
if
(
cultureInfo
.
AMDesignator
&&
cultureInfo
.
PMDesignator
)
{
formatDate
+=
"
AM/PM
"
;
...
...
cell/model/Serialize.js
View file @
cb0b720a
...
...
@@ -4697,7 +4697,7 @@
if
(
null
!=
sFormat
)
{
oRes
=
new
AscCommonExcel
.
Num
();
oRes
.
f
=
sFormat
;
if
((
5
<=
oNum
.
id
&&
oNum
.
id
<=
8
)
||
(
1
5
<=
oNum
.
id
&&
oNum
.
id
<=
17
)
||
(
37
<=
oNum
.
id
&&
oNum
.
id
<=
44
))
{
if
((
5
<=
oNum
.
id
&&
oNum
.
id
<=
8
)
||
(
1
4
<=
oNum
.
id
&&
oNum
.
id
<=
17
)
||
22
==
oNum
.
id
||
(
27
<=
oNum
.
id
&&
oNum
.
id
<=
31
)
||
(
36
<=
oNum
.
id
&&
oNum
.
id
<=
44
))
{
oRes
.
id
=
oNum
.
id
;
}
}
...
...
cell/model/WorkbookElems.js
View file @
cb0b720a
...
...
@@ -1061,6 +1061,18 @@ Num.prototype =
case
8
:
res
=
AscCommonExcel
.
getCurrencyFormatSimple
(
null
,
true
,
true
,
true
);
break
;
case
22
:
res
=
AscCommonExcel
.
getShortDateFormat
(
null
)
+
"
h:mm
"
;
break
;
case
14
:
case
27
:
case
28
:
case
29
:
case
30
:
case
31
:
case
36
:
res
=
AscCommonExcel
.
getShortDateFormat
(
null
);
break
;
case
37
:
res
=
AscCommonExcel
.
getCurrencyFormatSimple
(
null
,
false
,
false
,
false
);
break
;
...
...
@@ -6452,6 +6464,25 @@ AutoFilterDateElem.prototype.convertDateGroupItemToRange = function(oDateGroupIt
this
.
dateTimeGrouping
=
oDateGroupItem
.
DateTimeGrouping
;
};
function
getShortDateFormat
(
opt_cultureInfo
)
{
var
cultureInfo
=
opt_cultureInfo
?
opt_cultureInfo
:
AscCommon
.
g_oDefaultCultureInfo
;
var
dateElems
=
[];
for
(
var
i
=
0
;
i
<
cultureInfo
.
ShortDatePattern
.
length
;
++
i
)
{
switch
(
cultureInfo
.
ShortDatePattern
[
i
])
{
case
'
0
'
:
dateElems
.
push
(
'
d
'
);
break
;
case
'
1
'
:
dateElems
.
push
(
'
m
'
);
break
;
case
'
2
'
:
dateElems
.
push
(
'
yyyy
'
);
break
;
}
}
return
dateElems
.
join
(
'
/
'
);
}
function
getCurrencyFormatSimple
(
opt_cultureInfo
,
opt_fraction
,
opt_currency
,
opt_red
)
{
var
cultureInfo
=
opt_cultureInfo
?
opt_cultureInfo
:
AscCommon
.
g_oDefaultCultureInfo
;
var
numberFormat
=
opt_fraction
?
'
#,##0.00
'
:
'
#,##0
'
;
...
...
@@ -6718,6 +6749,7 @@ function getCurrencyFormat(opt_cultureInfo, opt_fraction, opt_currency, opt_curr
window
[
'
AscCommonExcel
'
].
DateGroupItem
=
DateGroupItem
;
window
[
'
AscCommonExcel
'
].
SortCondition
=
SortCondition
;
window
[
'
AscCommonExcel
'
].
AutoFilterDateElem
=
AutoFilterDateElem
;
window
[
'
AscCommonExcel
'
].
getShortDateFormat
=
getShortDateFormat
;
window
[
'
AscCommonExcel
'
].
getCurrencyFormatSimple
=
getCurrencyFormatSimple
;
window
[
'
AscCommonExcel
'
].
getCurrencyFormat
=
getCurrencyFormat
;
...
...
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