<commit_before>---
title: Add Time
version: 2.1.0
signature: |
  moment.duration().add(Number, String);
  moment.duration().add(Number);
  moment.duration().add(Duration);
  moment.duration().add(Object);
---


Mutates the original duration by adding time.

```javascript
var a = moment.duration(1, 'd');
var b = moment.duration(2, 'd');
a.add(b).days(); // 3
```<commit_msg>Update 10-add.md<commit_after>---
title: Add Time
version: 2.1.0
signature: |
  moment.duration().add(Number, String);
  moment.duration().add(Number);
  moment.duration().add(Duration);
  moment.duration().add(Object);
---


Mutates the original duration by adding time.

The same keys and shorthands used in creating durations can be used as the second String argument here also.


```javascript
var a = moment.duration(1, 'd');
var b = moment.duration(2, 'd');
a.add(b).days(); // 3
```
{'fraction_non_alphanumeric': 0.17939814814814814, 'fraction_numerical': 0.016203703703703703, 'mean_word_length': 4.274390243902439, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2536045', 'n_tokens_mistral': 292, 'n_tokens_neox': 276, 'n_words': 80}