Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
shanhong cheng committed Mar 24, 2017
1 parent 1a53822 commit 780d6f7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
package com.loganfreeman.utahfishing.common.utils;

import android.annotation.SuppressLint;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Time {

public static final DateFormat df = new SimpleDateFormat("mm/dd/yyyy");


/**
* yyyy-MM-dd HH:mm:ss
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
import rx.subjects.AsyncSubject;

import static android.R.id.list;
import static android.icu.lang.UCharacter.GraphemeClusterBreak.T;
import static java.util.Arrays.stream;
import static com.loganfreeman.utahfishing.common.utils.Time.df;

/**
* Created by shanhong on 3/21/17.
Expand All @@ -40,9 +42,6 @@ public class StockReport implements Parcelable {

private static final AsyncSubject<List<StockReport>> mSubject = AsyncSubject.create();

public static final DateFormat df = new SimpleDateFormat("mm/dd/yyyy");

public static final Pattern dayMonYear = Pattern.compile("(\\d{2})/(\\d{2})/(\\d{4})");

public String watername;
public String county;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
import java.util.List;
import java.util.stream.Collectors;

import static com.loganfreeman.utahfishing.common.utils.Time.df;


/**
* Created by shanhong on 3/22/17.
*/
Expand Down Expand Up @@ -66,7 +69,7 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
viewHolder.species.setText(report.species);
viewHolder.quantity.setText(String.valueOf(report.quantity));
viewHolder.length.setText(String.valueOf(report.length));
viewHolder.stockdate.setText(StockReport.df.format(report.stockdate));
viewHolder.stockdate.setText(df.format(report.stockdate));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ public class ExampleUnitTest {
@Test public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}


@Test
public void testCalendarDay() {

}
}

0 comments on commit 780d6f7

Please sign in to comment.