package com.alorma.github.utils;

import android.content.Context;
import tk.zielony.naturaldateformat.AbsoluteDateFormat;
import tk.zielony.naturaldateformat.NaturalDateFormat;
import tk.zielony.naturaldateformat.RelativeDateFormat;

public class NaturalTimeFormatter implements TimeFormatter {
  private Context context;

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

  @Override
  public String relative(long milis) {
    RelativeDateFormat relFormat = new RelativeDateFormat(context, NaturalDateFormat.TIME);
    return relFormat.format(milis);
  }

  @Override
  public String absolute(long milis) {
    AbsoluteDateFormat absFormat = new AbsoluteDateFormat(context,
        NaturalDateFormat.DATE | NaturalDateFormat.HOURS | NaturalDateFormat.MINUTES);
    return absFormat.format(milis);
  }
}

@@ -515,16 +515,24 @@
 context,
+%0A       
  Natural
@@ -546,12 +546,39 @@
 mat.
-TIME
+MONTHS %7C NaturalDateFormat.DAYS
 );%0A 
@@ -767,16 +767,68 @@
 t.DATE %7C
+ NaturalDateFormat.MONTHS %7C NaturalDateFormat.DAYS %7C
  Natural

Improve time visibility on Milestone