I would like to know how many seconds are in a certain range. For example, the start timestamp would be: 08/25/2022 16:55:29 For example, the end timestamp would be 08/25/2022 19:42:21
Now I want to know how many seconds I was between 6pm and 11pm. In the example above, 6141 seconds should come out.
i dont want to get the difference between the two areas. I want to get how many seconds of my area are in another area
How do I do that in Node.js?
Edit: Okay, I'll try to explain it again with an example:
An employee logs in at 4:55:29pm and finishes work at 7:42:21pm.
The company has set a range where you earn more per second. This area is between 6pm and 11pm.
Now I want to know how many seconds the employee is in this range.