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
73d6a7c0
Commit
73d6a7c0
authored
Dec 05, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 31395
parent
495bd233
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
513 additions
and
406 deletions
+513
-406
cell/api.js
cell/api.js
+1
-1
cell/model/WorkbookElems.js
cell/model/WorkbookElems.js
+6
-36
common/NumFormat.js
common/NumFormat.js
+506
-369
No files found.
cell/api.js
View file @
73d6a7c0
...
...
@@ -341,7 +341,7 @@ var editor;
if
(
cultureInfo
)
{
var
numFormatDigit
=
AscCommon
.
oNumFormatCache
.
get
(
'
#,##0.00
'
);
var
formatDate
=
AscCommon
Excel
.
getShortDateFormat
(
cultureInfo
);
var
formatDate
=
AscCommon
.
getShortDateFormat
(
cultureInfo
);
formatDate
+=
"
h:mm
"
;
if
(
cultureInfo
.
AMDesignator
&&
cultureInfo
.
PMDesignator
)
{
formatDate
+=
"
AM/PM
"
;
...
...
cell/model/WorkbookElems.js
View file @
73d6a7c0
...
...
@@ -1202,13 +1202,13 @@ Num.prototype =
}
switch
(
this
.
id
)
{
case
15
:
res
=
'
d
'
+
separator
+
'
mmm
'
+
separator
+
'
yy
'
;
res
=
AscCommon
.
getShortDateMonthFormat
(
true
,
true
,
separator
,
null
)
;
break
;
case
16
:
res
=
'
d
'
+
separator
+
'
mmm
'
;
res
=
AscCommon
.
getShortDateMonthFormat
(
true
,
false
,
separator
,
null
)
;
break
;
case
17
:
res
=
'
mmm
'
+
separator
+
'
yy
'
;
res
=
AscCommon
.
getShortDateMonthFormat
(
false
,
true
,
separator
,
null
)
;
break
;
}
}
else
{
...
...
@@ -1226,7 +1226,7 @@ Num.prototype =
res
=
AscCommonExcel
.
getCurrencyFormatSimple
(
null
,
true
,
true
,
true
);
break
;
case
22
:
res
=
AscCommon
Excel
.
getShortDateFormat
(
null
)
+
"
h:mm
"
;
res
=
AscCommon
.
getShortDateFormat
(
null
)
+
"
h:mm
"
;
break
;
case
14
:
case
27
:
...
...
@@ -1235,7 +1235,7 @@ Num.prototype =
case
30
:
case
31
:
case
36
:
res
=
AscCommon
Excel
.
getShortDateFormat
(
null
);
res
=
AscCommon
.
getShortDateFormat
(
null
);
break
;
case
37
:
res
=
AscCommonExcel
.
getCurrencyFormatSimple
(
null
,
false
,
false
,
false
);
...
...
@@ -3343,17 +3343,7 @@ CCellValue.prototype =
bTime
=
true
;
var
sDateFormat
=
""
;
if
(
bDate
)
{
for
(
var
i
=
0
,
length
=
cultureInfo
.
ShortDatePattern
.
length
;
i
<
length
;
i
++
)
{
var
nIndex
=
cultureInfo
.
ShortDatePattern
[
i
]
-
0
;
if
(
0
!=
i
)
sDateFormat
+=
"
/
"
;
if
(
0
==
nIndex
)
sDateFormat
+=
"
d
"
;
else
if
(
1
==
nIndex
)
sDateFormat
+=
"
m
"
;
else
if
(
2
==
nIndex
)
sDateFormat
+=
"
yyyy
"
;
}
sDateFormat
=
AscCommon
.
getShortDateFormat
(
cultureInfo
);
}
var
sTimeFormat
=
'
h:mm:ss
'
;
if
(
cultureInfo
.
AMDesignator
.
length
>
0
&&
cultureInfo
.
PMDesignator
.
length
>
0
){
...
...
@@ -7559,25 +7549,6 @@ 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
'
;
...
...
@@ -7898,7 +7869,6 @@ 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
;
...
...
common/NumFormat.js
View file @
73d6a7c0
This diff is collapsed.
Click to expand it.
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