Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Yay it works

  • Loading branch information...
commit cafb7eedb01f59c2ebffed342c49e6a444a1f724 1 parent a4f2341
@ayqazi authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/com/qadicorp/islamic_midnight_calc/MainActivity.java
View
2  src/com/qadicorp/islamic_midnight_calc/MainActivity.java
@@ -33,7 +33,7 @@ public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {
GregorianCalendar from = new GregorianCalendar(1, Calendar.JANUARY, 1, this.fromTime.getCurrentHour(), this.fromTime.getCurrentMinute());
GregorianCalendar to = new GregorianCalendar(1, Calendar.JANUARY, 2, this.toTime.getCurrentHour(), this.toTime.getCurrentMinute());
- long midPointInMillis = from.getTimeInMillis() - to.getTimeInMillis();
+ long midPointInMillis = (to.getTimeInMillis() - from.getTimeInMillis())/2;
GregorianCalendar mid = (GregorianCalendar) from.clone();
mid.add(Calendar.MILLISECOND, (int) midPointInMillis);
Please sign in to comment.
Something went wrong with that request. Please try again.