# oadate

> Converts between Date and OLE Automation Date

Latest version **0.5.2** (published 2024-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install oadate
pnpm add oadate
yarn add oadate
bun add oadate
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.2 |
| Published | 2024-01-17 |
| First published | 2019-07-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Luiz Américo Pereira Câmara |
| Maintainers | blikblum |
| Keywords | javascript, date, oadate, ole automation date |

## Links

- npm: https://www.npmjs.com/package/oadate
- Repository: https://github.com/blikblum/oadate
- Homepage: https://github.com/blikblum/oadate#readme
- Issues: https://github.com/blikblum/oadate/issues
- npm.io page: https://npm.io/package/oadate

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 0.5.2 (latest) — 2024-01-17
- 0.5.1 — 2024-01-17
- 0.5.0 — 2024-01-17
- 0.4.1 — 2021-05-11
- 0.4.0 — 2021-05-08
- 0.3.0 — 2020-01-26
- 0.2.0 — 2019-07-06
- 0.1.0 — 2019-07-06

## README

# oadate

Convert between native JS Date and OA Date (OLE Automation Date)

## Usage

```js
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

---
_Source: https://npm.io/package/oadate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
