Skip to content

Commit

Permalink
Fix issue moneymanagerex#13
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroLazzari committed Feb 2, 2015
1 parent 8fdce8b commit 06b0910
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@
<item>12</item>
<item>13</item>
<item>14</item>
<item>15</item>
<item>16</item>
</integer-array>

<string-array name="frequencies_items">
Expand All @@ -182,6 +184,8 @@
<item>@string/in_x_months</item>
<item>@string/every_x_days</item>
<item>@string/every_x_months</item>
<item>@string/montly_last_days</item>
<item>@string/montly_last_bussines_day</item>
</string-array>

<!-- Define font entries and values -->
Expand Down Expand Up @@ -310,4 +314,6 @@
<item>@string/sort_by_usage</item>
</string-array>

<string name="montly_last_days">Montly (last day)</string>
<string name="montly_last_bussines_day">Montly (last business day)</string>
</resources>
8 changes: 8 additions & 0 deletions src/com/money/manager/ex/utils/DateUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,14 @@ public static Date getDateNextOccurence(Date date, int repeats) {
case 12: //in_x_months
case 13: //every_x_days
case 14: //every_x_months
break;
case 15: //month (last day)
calendar.add(Calendar.MONTH, 1);
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.add(Calendar.DATE, -1);
break;
case 16: //month (last business day)

}
return calendar.getTime();
}
Expand Down

0 comments on commit 06b0910

Please sign in to comment.