Skip to content

Instantly share code, notes, and snippets.

@vladimirgamalyan
Created October 20, 2020 18:46
Show Gist options
  • Save vladimirgamalyan/f28f1b2a41448223608c68324058b241 to your computer and use it in GitHub Desktop.
Save vladimirgamalyan/f28f1b2a41448223608c68324058b241 to your computer and use it in GitHub Desktop.
days between dates
#include <iostream>
#include <chrono>
using namespace std::chrono;
int main() {
auto from = sys_days{March/16/2020};
auto to = sys_days{August/7/2020};
std::cout << (to - from).count() << std::endl;
}
@vladimirgamalyan
Copy link
Author

vladimirgamalyan commented Oct 20, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment