tempcommit 13/05

Committer:
tijl
Date:
Wed May 15 13:39:22 2019 +0000
Revision:
2:048e163245b7
Parent:
1:63664175e603
blub 15/05;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tijl 1:63664175e603 1 #ifndef DATETIME_H
tijl 1:63664175e603 2 #define DATETIME_H
tijl 1:63664175e603 3 #include <string>
tijl 1:63664175e603 4 #include <sstream>
tijl 1:63664175e603 5 #include <iostream>
tijl 1:63664175e603 6 using namespace std;
tijl 1:63664175e603 7
tijl 1:63664175e603 8 /**
tijl 1:63664175e603 9 * This class Shed can be used to act as one sheduled class (of many)
tijl 1:63664175e603 10 *
tijl 1:63664175e603 11 * @author Jordy Ampe
tijl 1:63664175e603 12 * @version 1.0
tijl 1:63664175e603 13 * @since 2019-05-08
tijl 1:63664175e603 14 */
tijl 1:63664175e603 15 class Datetime{
tijl 1:63664175e603 16 private:
tijl 1:63664175e603 17 int day;
tijl 1:63664175e603 18 int month;
tijl 1:63664175e603 19 int year;
tijl 1:63664175e603 20 int hour;
tijl 1:63664175e603 21 int minute;
tijl 1:63664175e603 22 int second;
tijl 1:63664175e603 23 public:
tijl 1:63664175e603 24 /**
tijl 1:63664175e603 25 * Constructor to make a Shed from json as a string
tijl 1:63664175e603 26 * @param json is a string with the received json for one shedules class from the API
tijl 1:63664175e603 27 */
tijl 1:63664175e603 28 Datetime(string datetime);
tijl 1:63664175e603 29
tijl 1:63664175e603 30 /**
tijl 1:63664175e603 31 * Destructor for a Datetime
tijl 1:63664175e603 32 */
tijl 1:63664175e603 33 ~Datetime();
tijl 1:63664175e603 34
tijl 1:63664175e603 35 /**
tijl 1:63664175e603 36 * @return day as an int
tijl 1:63664175e603 37 */
tijl 1:63664175e603 38 int getDay();
tijl 1:63664175e603 39
tijl 1:63664175e603 40 /**
tijl 1:63664175e603 41 * @return month as an int
tijl 1:63664175e603 42 */
tijl 1:63664175e603 43 int getMonth();
tijl 1:63664175e603 44
tijl 1:63664175e603 45 /**
tijl 1:63664175e603 46 * @return year as an int
tijl 1:63664175e603 47 */
tijl 1:63664175e603 48 int getYear();
tijl 1:63664175e603 49
tijl 1:63664175e603 50 /**
tijl 1:63664175e603 51 * @return hour as an int
tijl 1:63664175e603 52 */
tijl 1:63664175e603 53 int getHour();
tijl 1:63664175e603 54
tijl 1:63664175e603 55 /**
tijl 1:63664175e603 56 * @return minute as an int
tijl 1:63664175e603 57 */
tijl 1:63664175e603 58 int getMinute();
tijl 1:63664175e603 59
tijl 1:63664175e603 60 /**
tijl 1:63664175e603 61 * @return second as an int
tijl 1:63664175e603 62 */
tijl 1:63664175e603 63 int getSecond();
tijl 1:63664175e603 64
tijl 1:63664175e603 65 /**
tijl 1:63664175e603 66 * @return datetime as a string in belgium format dd/mm/yyyy hh:mm:ss
tijl 1:63664175e603 67 */
tijl 1:63664175e603 68 string getDatetime();
tijl 1:63664175e603 69
tijl 1:63664175e603 70 /**
tijl 1:63664175e603 71 * @return date as a string in belgium format dd/mm/yyyy
tijl 1:63664175e603 72 */
tijl 1:63664175e603 73 string getDate();
tijl 1:63664175e603 74
tijl 1:63664175e603 75 /**
tijl 1:63664175e603 76 * @return time as a string in belgium format hh:mm:ss
tijl 1:63664175e603 77 */
tijl 1:63664175e603 78 string getTime();
tijl 1:63664175e603 79
tijl 1:63664175e603 80 };
tijl 1:63664175e603 81 #endif