Skip to content

Commit

Permalink
fix time left spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Voldemar123 committed Dec 16, 2012
1 parent c15c6d8 commit 21a28cc
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/com/friday_countdown/andriod/FridayTimeLeft.java
Expand Up @@ -166,12 +166,18 @@ else if ((last_digit == 2 && last_two_digits != 12) ||

// select "left" phrase
public String getLeftMessage() {
if ( checkLeftPluralOne(days) )
leftMessageId = R.string.friday_time_left_day1;
else if ( checkLeftPluralOne(hours) )
leftMessageId = R.string.friday_time_left_hour1;
else if ( checkLeftPluralOne(mins) )
leftMessageId = R.string.friday_time_left_min1;
if ( days > 0 ) {
if ( checkLeftPluralOne(days) )
leftMessageId = R.string.friday_time_left_day1;
}
else if ( hours > 0 ) {
if ( hours > 0 && checkLeftPluralOne(hours) )
leftMessageId = R.string.friday_time_left_hour1;
}
else if ( mins > 0 ) {
if ( checkLeftPluralOne(mins) )
leftMessageId = R.string.friday_time_left_min1;
}


if ( mContext != null )
Expand All @@ -192,7 +198,7 @@ else if ( checkLeftPluralOne(mins) )

public static void main(String[] args) throws ParseException {
final DateFormat dfDate = new SimpleDateFormat("yyyy-MM-dd hh:mm");
Date curDate = dfDate.parse("2012-12-14 18:59");
Date curDate = dfDate.parse("2012-12-16 17:44");

FridayTimeLeft fr = new FridayTimeLeft(curDate);
fr.setContext(null);
Expand Down

0 comments on commit 21a28cc

Please sign in to comment.