package com.alexstyl.android;

import android.content.Context;

import com.alexstyl.specialdates.date.Date;
import com.alexstyl.specialdates.date.DateFormatUtils;
import com.alexstyl.specialdates.search.DateLabelCreator;

final public class AndroidDateLabelCreator implements DateLabelCreator {

    private static final boolean IGNORE_TODAY = false;
    private final Context context;

    public AndroidDateLabelCreator(Context context) {
        this.context = context;
    }

    @Override
    public String createLabelFor(Date date) {
        return DateFormatUtils.formatTimeStampString(context, date.toMillis(), IGNORE_TODAY);
    }
}

@@ -55,16 +55,54 @@
 Context;
+%0Aimport android.text.format.DateUtils;
 %0A%0Aimport
@@ -143,63 +143,8 @@
 te;%0A
-import com.alexstyl.specialdates.date.DateFormatUtils;%0A
 impo
@@ -276,63 +276,8 @@
  %7B%0A%0A
-    private static final boolean IGNORE_TODAY = false;%0A
     
@@ -444,16 +444,27 @@
 ateLabel
+WithoutYear
 For(Date
@@ -484,16 +484,98 @@
     
+int format_flags = DateUtils.FORMAT_SHOW_DATE %7C DateUtils.FORMAT_NO_YEAR;%0A        
 return D
 ateF
@@ -574,17 +574,11 @@
 rn D
-ateForm
 at
+e
 Util
@@ -589,23 +589,256 @@
 rmat
-TimeStampString
+DateTime(context, date.toMillis(), format_flags);%0A    %7D%0A%0A    @Override%0A    public String createLabelWithYearFor(Date date) %7B%0A        int format_flags = DateUtils.FORMAT_SHOW_DATE %7C DateUtils.FORMAT_SHOW_YEAR;%0A        return DateUtils.formatDateTime
 (con
@@ -864,20 +864,20 @@
 (), 
-IGNORE_TODAY
+format_flags
 );%0A 

Fix flags for AndroidDateLabelCreator