Hello.
I use the library of moment.js . I'm trying to get the time difference in the right format. And I just can not figure out how to combine, one with the other. At the moment I have:
moment.lang('ru'); // результат будет: 2016-03-30 23:59:57 $('.block').html(moment('2016-03-30 23:59:57').format('YYYY-MM-DD HH:mm:ss')); // результат будет: месяц назад $('.block').html(moment('2016-03-30 23:59:57').fromNow()); I'm trying to get something like that 0000-00-27 06:58:52 - here the amount of time has passed since the date specified in .moment (...). Simply put, you need to show in this format: YYYY-MM-DD HH:mm:ss time difference.
What needs to be done to realize the date output in the right format?