Current version of API cannot be determined programmatically.
In WS API 1.18 we deprecated "current" pointer to the most recent version of the web service.It changed with every new release of the web service. We deprecated it because it was found to negate the benefits of the web service versioning. Users tended to point at current as a convenience without being prepared for its intrinsic volatility. To encourage users to point their applications at a specific version and to minimize the impact of releasing new versions of web service API we removed the current pointer altogether.
The most reliable way to check the latest version of API is to access our WS API doc you mentioned in your post.
There you can see the latest version under the Available Versions section in the left frame. The latest one is by default listed as selected.