#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <iterator>
using namespace std;

struct value {
    string code;
    string date;
    string name;
};


int main() {
	vector<value> v { { "x", "2015-02-20", "xx"}, { "y", "2013-01-12", "yy"},{ "zx", "2017-12-31", "zzxx"}}; 
    std::sort (v.begin(), v.end(), [](value&a, value&b)->bool { return a.date<b.date; });   
    for (auto &x:v ) cout<<x.date<<endl; 
	return 0;
}