I have a big old C ++ project. It has at least three date and time structures. They look like this:
struct Date { int day; int month; int year; }; struct Time { int hour; int min; int second; };
Some of them use double for Time :: second, some of them have "optimization" and use short for Time::(min, hour) and Date::(month, day) .
So, now with the new C ++ 11 standard (and can be upgraded) can you replace them with what everyone uses?
I looked at std::chrono but can't see how I can use it.
For example, to illustrate what I want here: I have a function, I give Date and coordinate this function, and it calculates when the Sun rises and sets and returns two Time structures.
source share