---
title: Object
version: 2.2.1
signature: |
  moment({unit: value, ...});
---


```javascript
moment({ hour:15, minute:10 });
moment({ y    :2010, M     :3, d   :5, h    :15, m      :10, s      :3, ms          :123});
moment({ year :2010, month :3, day :5, hour :15, minute :10, second :3, millisecond :123});
moment({ years:2010, months:3, days:5, hours:15, minutes:10, seconds:3, milliseconds:123});
moment({ years:2010, months:3, date:5, hours:15, minutes:10, seconds:3, milliseconds:123});
```

You can create a moment by specifying some of the units in an object.

Months are 0-based, e.g. April is represented as 3. All other values are used as they are. The date used in the examples is 2015-04-05.

Omitted units default to 0 or the current date, month, and year.

`day` and `date` key both mean day-of-the-month.

`date` was added in **2.8.4**.

---
title: Object
version: 2.2.1
signature: |
  moment({unit: value, ...});
---


```javascript
moment({ hour:15, minute:10 });
moment({ y    :2010, M     :3, d   :5, h    :15, m      :10, s      :3, ms          :123});
moment({ year :2010, month :3, day :5, hour :15, minute :10, second :3, millisecond :123});
moment({ years:2010, months:3, days:5, hours:15, minutes:10, seconds:3, milliseconds:123});
moment({ years:2010, months:3, date:5, hours:15, minutes:10, seconds:3, milliseconds:123});
```

You can create a moment by specifying some of the units in an object.

Omitted units default to 0 or the current date, month, and year.

`day` and `date` key both mean day-of-the-month.

`date` was added in **2.8.4**.

Note that like `moment(Array)` and `new Date(year, month, date)`, months are 0 indexed.

Rearrange note about months being 0 indexed.
Rearrange note about months being 0 indexed.
