Tijl Goens
/
EpaperdisplayII
tempcommit 13/05
Embed:
(wiki syntax)
Show/hide line numbers
Datetime.h
00001 #ifndef DATETIME_H 00002 #define DATETIME_H 00003 #include <string> 00004 #include <sstream> 00005 #include <iostream> 00006 using namespace std; 00007 00008 /** 00009 * This class Shed can be used to act as one sheduled class (of many) 00010 * 00011 * @author Jordy Ampe 00012 * @version 1.0 00013 * @since 2019-05-08 00014 */ 00015 class Datetime{ 00016 private: 00017 int day; 00018 int month; 00019 int year; 00020 int hour; 00021 int minute; 00022 int second; 00023 public: 00024 /** 00025 * Constructor to make a Shed from json as a string 00026 * @param json is a string with the received json for one shedules class from the API 00027 */ 00028 Datetime(string datetime); 00029 00030 /** 00031 * Destructor for a Datetime 00032 */ 00033 ~Datetime(); 00034 00035 /** 00036 * @return day as an int 00037 */ 00038 int getDay(); 00039 00040 /** 00041 * @return month as an int 00042 */ 00043 int getMonth(); 00044 00045 /** 00046 * @return year as an int 00047 */ 00048 int getYear(); 00049 00050 /** 00051 * @return hour as an int 00052 */ 00053 int getHour(); 00054 00055 /** 00056 * @return minute as an int 00057 */ 00058 int getMinute(); 00059 00060 /** 00061 * @return second as an int 00062 */ 00063 int getSecond(); 00064 00065 /** 00066 * @return datetime as a string in belgium format dd/mm/yyyy hh:mm:ss 00067 */ 00068 string getDatetime(); 00069 00070 /** 00071 * @return date as a string in belgium format dd/mm/yyyy 00072 */ 00073 string getDate(); 00074 00075 /** 00076 * @return time as a string in belgium format hh:mm:ss 00077 */ 00078 string getTime(); 00079 00080 }; 00081 #endif
Generated on Thu Jul 14 2022 00:56:38 by 1.7.2