ngx-moment
ngx-moment copied to clipboard
Getting hours and min from future date
I can get the total number of hours and min from a future date as a whole but I need the difference in min to be based on the hour. For example if it's 3:17 pm and I'm testing against tomorrow, it responds 8h and 522m. Both are correct but what I'm wanting 8h and 43m.
{{nextDate | amDifference: currentDate : 'hours'}}h {{nextDate | amDifference: currentDate : 'minutes'}}m
this.nextDate = new Date();
this.nextDate.setDate(this.nextDate.getDate() + 1);
this.nextDate.setHours(0,0,0,0);