Moment duration

Source: https://stackoverflow.com/questions/18623783/get-the-time-difference-between-two-datetimes/34672015

moment.duration(now.diff(then)).humanize()


public getDurationText(date1, date2) {
if (!date1) {
return '';
}
// check null date2 (is current date)
const date2Tmp = date2 ? date2 : new Date();
// return
return moment.duration(moment(date2Tmp).diff(moment(date1))).humanize();
}

Không có nhận xét nào:

Check to be sure that port 22 is enabled before you reload

 https://superuser.com/questions/590600/ufw-is-active-but-not-enabled-why etting  ENABLED=yes  in  /etc/ufw/ufw.conf  did it for me. $ sudo ...