Permalink
Browse files

Added a getDate() method

  • Loading branch information...
1 parent 5035041 commit 87d06b1a72f2f3891299c5d79c4026c550281577 @mrbichel committed Feb 23, 2014
Showing with 8 additions and 3 deletions.
  1. +7 −2 src/data.h
  2. +1 −1 src/testApp.cpp
View
@@ -67,7 +67,7 @@ class MarketData {
ofPushMatrix();
ofTranslate(10,20);
- ofDrawBitmapString("Minute of day: " + ofToString(getRealCurrentMinute()), 10,400);
+ ofDrawBitmapString("Day: " + date + ". Minute of day: " + ofToString(getRealCurrentMinute()), 10,400);
for(int l=0;l<locationNum;l++) {
@@ -110,7 +110,7 @@ class MarketData {
// 2014-01-20 00:00:00-08:00,Embarcadero,Buses,0
string timestamp = csv.data[i][0];
- string date = ofSplitString(timestamp, " ")[0];
+ date = ofSplitString(timestamp, " ")[0];
// sort out 1 day
if(_date == date) {
@@ -160,7 +160,12 @@ class MarketData {
cout << "bang fired!" << args.flag << endl;
};
+ string getDate() {
+ return date;
+ }
+private:
+ string date;
};
View
@@ -5,7 +5,7 @@
void testApp::setup(){
mdata.setup();
- mdata.importDay();
+ mdata.importDay("2014-01-22");
}

0 comments on commit 87d06b1

Please sign in to comment.