Comparing version 0.8.0 to 0.8.1
{ | ||
"name": "ssf", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"author": "SheetJS", | ||
@@ -5,0 +5,0 @@ "description": "Format data using ECMA-376 spreadsheet Format Codes", |
@@ -54,3 +54,3 @@ # SSF | ||
[![Build Status](https://travis-ci.org/SheetJS/ssf.png?branch=master)](https://travis-ci.org/SheetJS/ssf) | ||
[![Build Status](https://travis-ci.org/SheetJS/ssf.svg?branch=master)](https://travis-ci.org/SheetJS/ssf) | ||
@@ -57,0 +57,0 @@ [![Coverage Status](https://coveralls.io/repos/SheetJS/ssf/badge.png?branch=master)](https://coveralls.io/r/SheetJS/ssf?branch=master) |
10
ssf.js
@@ -5,3 +5,3 @@ /* ssf.js (C) 2013-2014 SheetJS -- http://sheetjs.com */ | ||
var make_ssf = function make_ssf(SSF){ | ||
SSF.version = '0.8.0'; | ||
SSF.version = '0.8.1'; | ||
function _strrev(x) { var o = "", i = x.length-1; while(i>=0) o += x.charAt(i--); return o; } | ||
@@ -379,3 +379,3 @@ function fill(c,l) { var o = ""; while(o.length < l) o+=c; return o; } | ||
} | ||
if((r = fmt.match(/^([#0]+)\.([#0]+)$/)) !== null) { | ||
if((r = fmt.match(/^([#0?]+)\.([#0]+)$/)) !== null) { | ||
o = "" + val.toFixed(Math.min(r[2].length,10)).replace(/([^0])0+$/,"$1"); | ||
@@ -544,3 +544,3 @@ ri = o.indexOf("."); | ||
if(fmt[i+1] === "1" || fmt[i+1] === "2") { | ||
if(dt == null) dt = parse_date_code(v, opts, fmt[i+1] === "2"); | ||
if(dt==null) { dt=parse_date_code(v, opts, fmt[i+1] === "2"); if(dt==null) return ""; } | ||
out[out.length] = {t:'X', v:fmt.substr(i,2)}; lst = c; i+=2; break; | ||
@@ -562,4 +562,4 @@ } | ||
if(dt==null) dt=parse_date_code(v, opts); | ||
if(fmt.substr(i, 3) === "A/P") {q.v = dt.H >= 12 ? "P" : "A"; q.t = 'T'; hr='h';i+=3;} | ||
else if(fmt.substr(i,5) === "AM/PM") { q.v = dt.H >= 12 ? "PM" : "AM"; q.t = 'T'; i+=5; hr='h'; } | ||
if(fmt.substr(i, 3) === "A/P") { if(dt!=null) q.v = dt.H >= 12 ? "P" : "A"; q.t = 'T'; hr='h';i+=3;} | ||
else if(fmt.substr(i,5) === "AM/PM") { if(dt!=null) q.v = dt.H >= 12 ? "PM" : "AM"; q.t = 'T'; i+=5; hr='h'; } | ||
else { q.t = "t"; ++i; } | ||
@@ -566,0 +566,0 @@ if(dt==null && q.t === 'T') return ""; |
14
ssf.md
@@ -672,3 +672,3 @@ # SSF | ||
} | ||
if((r = fmt.match(/^([#0]+)\.([#0]+)$/)) !== null) { | ||
if((r = fmt.match(/^([#0?]+)\.([#0]+)$/)) !== null) { | ||
o = "" + val.toFixed(Math.min(r[2].length,10)).replace(/([^0])0+$/,"$1"); | ||
@@ -885,3 +885,3 @@ ri = o.indexOf("."); | ||
if(fmt[i+1] === "1" || fmt[i+1] === "2") { | ||
if(dt == null) dt = parse_date_code(v, opts, fmt[i+1] === "2"); | ||
if(dt==null) { dt=parse_date_code(v, opts, fmt[i+1] === "2"); if(dt==null) return ""; } | ||
out[out.length] = {t:'X', v:fmt.substr(i,2)}; lst = c; i+=2; break; | ||
@@ -935,4 +935,4 @@ } | ||
if(dt==null) dt=parse_date_code(v, opts); | ||
if(fmt.substr(i, 3) === "A/P") {q.v = dt.H >= 12 ? "P" : "A"; q.t = 'T'; hr='h';i+=3;} | ||
else if(fmt.substr(i,5) === "AM/PM") { q.v = dt.H >= 12 ? "PM" : "AM"; q.t = 'T'; i+=5; hr='h'; } | ||
if(fmt.substr(i, 3) === "A/P") { if(dt!=null) q.v = dt.H >= 12 ? "P" : "A"; q.t = 'T'; hr='h';i+=3;} | ||
else if(fmt.substr(i,5) === "AM/PM") { if(dt!=null) q.v = dt.H >= 12 ? "PM" : "AM"; q.t = 'T'; i+=5; hr='h'; } | ||
else { q.t = "t"; ++i; } | ||
@@ -1493,5 +1493,4 @@ if(dt==null && q.t === 'T') return ""; | ||
```>.gitignore | ||
.gitignore | ||
node_modules/ | ||
tmp/ | ||
node_modules/ | ||
.vocrc | ||
@@ -1564,3 +1563,3 @@ v8.log | ||
"name": "ssf", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"author": "SheetJS", | ||
@@ -1603,2 +1602,3 @@ "description": "Format data using ECMA-376 spreadsheet Format Codes", | ||
node_js: | ||
- "0.11" | ||
- "0.10" | ||
@@ -1605,0 +1605,0 @@ - "0.8" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147098