In TypeScript or JavaScript, determining the midpoint between two dates is easy using the native Date
library.
Determine the middle between two dates
|
|
In the example above, getTime()
returns the number of seconds since epoch. Adding the seconds and dividing by two gives the midpoint.