aboutsummaryrefslogtreecommitdiff
path: root/node_modules/date-time/readme.md
blob: 9c5b87b11c312fd4d7bd3aef0a26fb484a4e22f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# date-time [![Build Status](https://travis-ci.org/sindresorhus/date-time.png?branch=master)](http://travis-ci.org/sindresorhus/date-time)

> Pretty UTC datetime: `2014-01-09 06:46:01 UTC`


## Install

Install with [npm](https://npmjs.org/package/date-time)

```
npm install --save date-time
```


## Example

```js
var dateTime = require('date-time');

dateTime();
//=> 2014-01-09 06:46:01 UTC

dateTime(new Date(2050, 1, 2));
//=> 2050-02-01 23:00:00 UTC
```

## API

### dateTime(date)

#### date

Type: `Date`  
Default: `new Date()`


## License

MIT © [Sindre Sorhus](http://sindresorhus.com)