Clover Coverage Report - AnCal Coverage Report
Coverage timestamp: gio dic 18 2014 12:18:42 EST
../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
6   37   7   0,86
0   27   1,17   7
7     1  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  AnCalDateUtils       Line # 9 6 7 92,3% 0.9230769
 
No Tests
 
1    package pl.magot.vetch.ancal;
2   
3    import java.text.DateFormatSymbols;
4    import java.util.Calendar;
5   
6    import android.content.Context;
7    import android.text.format.DateUtils;
8   
 
9    public abstract class AnCalDateUtils {
10    private static final int LONG_DATE = DateUtils.FORMAT_SHOW_WEEKDAY | DateUtils.LENGTH_MEDIUM;
11   
 
12  49 toggle public static String formatLongDate(Context context, Calendar date) {
13  49 return DateUtils.formatDateTime(context, date.getTimeInMillis(), LONG_DATE);
14    }
15   
 
16  107 toggle public static String formatMediumDate(Context context, Calendar date) {
17  107 return getAbbrevDayOfWeekString(date.get(Calendar.DAY_OF_WEEK)) + ", " + DateUtils.formatDateTime(context, date.getTimeInMillis(), DateUtils.FORMAT_NUMERIC_DATE);
18    }
19   
 
20  9 toggle public static String formatTime(Context context, Calendar date) {
21  9 return DateUtils.formatDateTime(context, date.getTimeInMillis(), DateUtils.FORMAT_SHOW_TIME);
22    }
23   
 
24  252 toggle public static String getAbbrevDayOfWeekString(Calendar date) {
25  252 return getAbbrevDayOfWeekString(date.get(Calendar.DAY_OF_WEEK));
26    }
27   
 
28  905 toggle public static String getAbbrevDayOfWeekString(int day) {
29  905 return DateUtils.getDayOfWeekString(day, DateUtils.LENGTH_MEDIUM);
30    }
31   
 
32  1 toggle public static String[] getWeekDays() {
33  1 return new DateFormatSymbols().getWeekdays();
34    }
35   
 
36  0 toggle private AnCalDateUtils() { /* NOOP */ }
37    }