https://github.com/andersdjohnson/date-to-props.js
  
  
    Get simple properties from Date object. 
    https://github.com/andersdjohnson/date-to-props.js
  
        Last synced: 1 day ago 
        JSON representation
    
Get simple properties from Date object.
- Host: GitHub
- URL: https://github.com/andersdjohnson/date-to-props.js
- Owner: AndersDJohnson
- License: isc
- Created: 2015-03-07T20:47:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-04-02T23:34:06.000Z (over 5 years ago)
- Last Synced: 2025-06-13T01:06:33.516Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- 
            Metadata Files:
            - Readme: README.md
- License: LICENSE
 
Awesome Lists containing this project
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
}
```