compute numberOfseconds of week to date and week to month

I am trying to find out totalseconds in week to current datetime
1
2
3
4
   auto tp = floor<seconds>(system_clock::now());
    auto dp = floor<days>(tp);
    dp -= weekday{dp} - Monday;
    int WeekSeconds=tp - dp;
Last edited on
http://sscce.org/

Post the minimal main() and include files necessary to make something that's easy for us to simply copy/paste/compile and test.

Topic archived. No new replies allowed.