Created
May 20, 2014 17:35
-
-
Save john-evangelist/aad0ce5b1498f117951c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Date doParse(String toParse) { | |
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy"); | |
try { | |
return simpleDateFormat.parse(toParse); | |
} catch (ParseException e) { | |
e.printStackTrace(); | |
} | |
return null; | |
} | |
public static List<Venda> doFilter(Date dateInicial, Date dateFinal, List<Venda> incommingVendas) { | |
List<Venda> vendas = new ArrayList<Venda>(); | |
for (Venda v : incommingVendas) { | |
if (v.getData().after(dateInicial) && v.getData().before(dateFinal)) { | |
vendas.add(v); | |
} | |
} | |
return vendas; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment