I have a case where I need to check the diff of the hours between two Date-time. I am new in typescript but in java, I have done something like below just a small example to show you what I need.
int hours = (int) ChronoUnit.HOURS.between(app.getDisableAt(), LocalDateTime.now(Clock.systemUTC()));
And I need the same thing but in front-end. By this, I get the hour's diff correctly, but I don't want to save in database so I prefer the front-end.