moment duratuion from hours

JavaScript
var k = moment.duration(12, 'hours');
Source

Also in JavaScript: