Commit 9a0ca7d1 authored by Sebastián Katzer's avatar Sebastián Katzer
Browse files

Datum wird korrekt berechnet

parent 52aa742a
Loading
Loading
Loading
Loading
+2 −11
Changes for src/android/LocalNotificationOptions.java: 2 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -26,26 +26,17 @@ public class LocalNotificationOptions {
    private String subTitle       = "";
    private String ticker         = "";
    private boolean repeatDaily   = false;
    private String notificationId = "";
    private String notificationId = null;

    /**
     * Parse options passed from javascript part of this plugin.
     */
    public void parse (JSONObject options) {
	    // Parse string representing the date
        String date    = options.optString("date");
        String message = options.optString("message");

        if (!"".equals(date)) {
    		String[] dateParts = date.split("/");

            int month = Integer.parseInt(dateParts[0]);
            int day   = Integer.parseInt(dateParts[1]);
            int year  = Integer.parseInt(dateParts[2]);
            int hour  = Integer.parseInt(dateParts[3]);
            int min   = Integer.parseInt(dateParts[4]);

    		calendar.set(year, month, day, hour, min);
            calendar.setTimeInMillis(1000*Long.parseLong(date));
        }

        if (!"".equals(message)) {