# date-to-props

> Get simple properties from Date object.

Latest version **1.0.1** (published 2019-04-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install date-to-props
pnpm add date-to-props
yarn add date-to-props
bun add date-to-props
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-04-10 |
| First published | 2015-03-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Anders D. Johnson |
| Maintainers | adjohnson916 |
| Keywords | date, dates, property, properties, object, objects |

## Links

- npm: https://www.npmjs.com/package/date-to-props
- Repository: https://github.com/AndersDJohnson/date-to-props.js
- Issues: https://github.com/AndersDJohnson/date-to-props.js/issues
- npm.io page: https://npm.io/package/date-to-props

## 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

- 1.0.1 (latest) — 2019-04-10
- 1.0.0 — 2015-03-08

## README

# date-to-props.js

Get simple properties from Date object.

## Install

Node
```
npm install --save date-to-props
```

Bower (AMD, Global)
```
bower install --save date-to-props
```

## Use

```js
var dateToProps = require('date-to-props');

var date = new Date();
var props = dateToProps(date);

// props is now something like:
{
  date: 7,
  day: 6,
  fullYear: 2015,
  hours: 19,
  milliseconds: 707,
  minutes: 59,
  month: 2,
  seconds: 34,
  time: 1425779974707,
  timezoneOffset: 360,
  UTCDate: 8,
  UTCDay: 0,
  UTCFullYear: 2015,
  UTCHours: 1,
  UTCMilliseconds: 707,
  UTCMinutes: 59,
  UTCMonth: 2,
  UTCSeconds: 34,
  year: 115
}
```

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