DDim1000,
https://github.com/jsmreese/moment-duration-format
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/locale/ru.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment-duration-format/1.3.0/moment-duration-format.min.js"></script>
</head>
<body>
<p></p>
<script>
moment.locale('ru');
var UnlockRemindPass = moment().add(28,'hours');
function fn()
{
var DateTime = moment();
var d = UnlockRemindPass - DateTime;
document.querySelector("p").innerHTML = moment.duration(UnlockRemindPass.diff(DateTime)).format("dd[ дн.] hh[ ч.] mm[ мин.] ss[ сек.]");
d > 0 && window.setTimeout(fn, 300)
}
fn()
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/locale/ru.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment-duration-format/1.3.0/moment-duration-format.min.js"></script>
</head>
<body>
<p></p>
<script>
moment.locale('ru');
function fn()
{
var m1 = moment('2017-09-03 18:59:36','YYYY-MM-DD HH:mm:ss');
var m2 = moment('2017-09-04 17:59:36','YYYY-MM-DD HH:mm:ss');
var diff = moment.duration(m2.diff(m1)).format("d[ дн.] h:mm:ss"); //
document.querySelector("p").innerHTML = diff
}
fn()
</script>
</body>
</html>