oadate
TypeScript icon, indicating that this package has built-in type declarations

0.5.2 • Public • Published

oadate

Convert between native JS Date and OA Date (OLE Automation Date)

Usage

import { OADateToDate, DateToOADate } from '../index.mjs'

OADateToDate(44324) // converts OA Date to JS Date using local timezone offset
OADateToDate(44324, 0) // pass 0 to convert to UTC
OADateToDate(44324, 180) // or any offset in minutes

DateToOADate(new Date()) // converts JS Date to OA Date using local timezone offset
DateToOADate(new Date(), 0) // pass 0 to convert from UTC
DateToOADate(new Date(), 180) // or any offset in minutes

Credits

LICENSE - MIT 2021 - Luiz Américo Uses code from https://github.com/markitondemand/moment-msdate

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.5.212latest

Version History

VersionDownloads (Last 7 Days)Published
0.5.212
0.5.11
0.5.03
0.4.116
0.4.00
0.3.00
0.2.01
0.1.01

Package Sidebar

Install

npm i oadate

Weekly Downloads

34

Version

0.5.2

License

MIT

Unpacked Size

11.4 kB

Total Files

10

Last publish

Collaborators

  • blikblum