Package Exports
- exceldate2
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (exceldate2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
exceldate
A Node.js package to convert excel timestamps to JS dates. A simple utility function with no dependencies, exceldate accepts a number directly or stored in a string.
Installation
yarn add exceldate
# or
npm install exceldateUsage
Check it out:
const exceldate = require('exceldate')
// use it directly
console.log(exceldate('1').toISOString()) // 1899-12-31T00:00:00.000Z
console.log(exceldate(4242.4242).toISOString()) // 1911-08-12T10:10:50.880Z
// or use it with a callback
exceldate(9000, (err, res) => {
  if (!err) console.log(res.toISOString()) // 1924-08-21T00:00:00.000Z
})Testing
Prerequisites:
- clone/download the repo
- navigate to the repo: cd exceldate
- install dev dependencies to test: yarnornpm i
To test run yarn test or npm test
License
This is free and unencumbered software released "as is" into the public domain, without warranty of any kind. For more information, please refer to the LICENSE file and https://unlicense.org
Changelog:
- 0.0.3: first stable version
- 1.0.0: support callback style interface, remove semicolons, updated test framework, updated README
- 1.0.1: remove old code comment
- 1.0.2: update README
- 1.1.0: added testing dev dependency, integrate eslint & prettier, added JSDoc types, friendlier error messages, invalid inputs will now throw an error, and README updates