Add visualizer for std::chrono::system_clock::time_point by Nerixyz · Pull Request #5005 · microsoft/STL (original) (raw)

Adds a visualizer for std::chrono::system_clock::time_point. To compute the date representation, it uses the same algorithm as _Civil_from_days (with the same "variables" as https://howardhinnant.github.io/date_algorithms.html#civil_from_days).
The time is displayed as hh:mm:ss.ssssss. Additionally, the visualizer shows ns/100 (the actual value of the time-point), us, ms, and s.

Unfortunately, the format specifiers don't provide a way of formatting numbers with padding, so they're formatted "manually" (e.g. a 2-digit v is formatted as {v/10}{v%10}).

See also: #314