diff --git a/examples/timeline/03_performance.html b/examples/timeline/03_performance.html
index 678aeeb9..de7588ab 100644
--- a/examples/timeline/03_performance.html
+++ b/examples/timeline/03_performance.html
@@ -52,8 +52,8 @@
var container = document.getElementById('visualization');
var options = {
editable: true,
- start: now.clone().add('days', -3),
- end: now.clone().add('days', 11),
+ start: now.clone().add(-3, 'days'),
+ end: now.clone().add(11, 'days'),
zoomMin: 1000 * 60 * 60 * 24, // a day
zoomMax: 1000 * 60 * 60 * 24 * 30 * 3 // three months
//maxHeight: 300,
diff --git a/examples/timeline/05_groups.html b/examples/timeline/05_groups.html
index 982cb7fd..7182670f 100644
--- a/examples/timeline/05_groups.html
+++ b/examples/timeline/05_groups.html
@@ -45,7 +45,7 @@
// create a dataset with items
var items = new vis.DataSet();
for (var i = 0; i < itemCount; i++) {
- var start = now.clone().add('hours', Math.random() * 200);
+ var start = now.clone().add(Math.random() * 200, 'hours');
var group = Math.floor(Math.random() * groupCount);
items.add({
id: i,
diff --git a/lib/timeline/Range.js b/lib/timeline/Range.js
index f4dcf4ce..9b87d90e 100644
--- a/lib/timeline/Range.js
+++ b/lib/timeline/Range.js
@@ -13,8 +13,8 @@ var Component = require('./component/Component');
*/
function Range(body, options) {
var now = moment().hours(0).minutes(0).seconds(0).milliseconds(0);
- this.start = now.clone().add('days', -3).valueOf(); // Number
- this.end = now.clone().add('days', 4).valueOf(); // Number
+ this.start = now.clone().add(-3, 'days').valueOf(); // Number
+ this.end = now.clone().add(4, 'days').valueOf(); // Number
this.body = body;
diff --git a/test/timeline.html b/test/timeline.html
index ac727aef..3f092ee1 100644
--- a/test/timeline.html
+++ b/test/timeline.html
@@ -5,9 +5,9 @@
-
+