title: How to get current date data only from API
body: <p>I'm creating an app which calls an API through volley
  API: <code>http://cricapi.com/api/matches?apikey=&lt;my API key&gt;</code></p>
  
  <p>After calling this API I'm getting all the data today and after.My question is, I want to get only current date (Today) data only.</p>
  
  <p>MainActivity.java</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
      private RecyclerView recyclerView;
      private RecyclerView.Adapter adapter;
      private List&lt;Model&gt; modelList;
      private String url = "http://cricapi.com/api/matches?apikey=&lt;key&gt;";
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          recyclerView = findViewById(R.id.recyclerview);
          recyclerView.setHasFixedSize(true);
          recyclerView.setLayoutManager(new LinearLayoutManager(this));
          modelList = new ArrayList&lt;&gt;();
          loadUrlData();
      }
      private void loadUrlData() {
          final ProgressDialog pd = new ProgressDialog(this);
          pd.setMessage("Loading ...");
          pd.show();
          StringRequest stringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener&lt;String&gt;() {
              @Override
              public void onResponse(String response) {
                  pd.dismiss();
                  try {
                      JSONArray jsonArray=new JSONObject(response).getJSONArray("matches");
                      for (int i=0; i&lt;jsonArray.length(); i++){
                          try {
                              String uniqueid=jsonArray.getJSONObject(i).getString("unique_id");
                              String team1=jsonArray.getJSONObject(i).getString("team-1");
                              String team2=jsonArray.getJSONObject(i).getString("team-2");
                              String matchType=jsonArray.getJSONObject(i).getString("type");
                              String matchStatus=jsonArray.getJSONObject(i).getString("matchStarted");
                              if (matchStatus.equals("true")){
                                  matchStatus="Match Started";
                              }else {
                                  matchStatus="Match not started";
                              }
                              String dateTimeGMT=jsonArray.getJSONObject(i).getString("dateTimeGMT");
                              SimpleDateFormat format1=new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
                            format1.setTimeZone(TimeZone.getTimeZone(dateTimeGMT));
                              Date date=format1.parse(dateTimeGMT);
                              SimpleDateFormat format2=new SimpleDateFormat("yyyy-MM-dd HH:mm");
                              format2.setTimeZone(TimeZone.getTimeZone("GMT"));
                              String dateTime=format2.format(date);
                              Model model=new Model(uniqueid,team1,team2,matchType,matchStatus,dateTime);
                              modelList.add(model);
                          }catch (Exception e){
                              Toast.makeText(MainActivity.this,"" +e.getMessage(),Toast.LENGTH_SHORT).show();
                          }
                      }
                      adapter=new MyAdapter(modelList,getApplicationContext());
                      recyclerView.setAdapter(adapter);
  
                  }catch (Exception e){
                      Toast.makeText(MainActivity.this,"" +e.getMessage(),Toast.LENGTH_SHORT).show();
                  }
  
              }
          }, new Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError error) {
                  Toast.makeText(MainActivity.this,"Error:" +error,Toast.LENGTH_LONG).show();
              }
          });
          RequestQueue requestQueue= Volley.newRequestQueue(this);
          requestQueue.add(stringRequest);
      }
  }
  </code></pre>