mardi 28 août 2018

difference between a date and current date

I have a 14 day schedule and instead of memorizing it I wrote this. but I don't know how to get the current date in a format that will work for this program. C++11 is preferred but not required

#include <iostream>
#include <date.h>

using namespace std;

int main()
{
     using namespace date;
    using namespace std;
    auto a = 2012_y/1/24;
    auto b = current date; //I have not figured how to get current date 
    auto c = (sys_days{b} - sys_days{a}).count();
    auto d = c%14
    switch (d) {
    case 1: cout << blank; //blank will be replaced with the schedule
    break;
    case 2: cout << blank;
    break;
    case 3: cout << blank;
    break;
    case 4: cout << blank;
    break;
    case 5: cout << blank;
    break;
    case 6: cout << blank;
    break;
    case 7: cout << blank;
    break;
    case 8: cout << blank;
    break;
    case 9: cout << blank;
    break;
    case 10: cout << blank;
    break;
    case 11: cout << blank;
    break;
    case 12: cout << blank;
    break;
    case 13: cout << blank;
    break;
    case 14: cout << blank;
    break;
    }
    return 0;
}

Aucun commentaire:

Enregistrer un commentaire