Commit | Line | Data |
---|---|---|
99658f57 PT |
1 | package ro.ieval.unical; |
2 | ||
3 | import java.util.GregorianCalendar; | |
4 | ||
5 | import android.content.Context; | |
6 | import android.content.res.Resources; | |
7 | ||
8 | public class CalendarUtils { | |
9 | public static String DayToString(Context context, GregorianCalendar gc) { | |
10 | int dc=gc.get(GregorianCalendar.DAY_OF_WEEK); | |
11 | if(dc==GregorianCalendar.SUNDAY) return context.getString(R.string.sunday); | |
12 | else if(dc==GregorianCalendar.MONDAY) return context.getString(R.string.monday); | |
13 | else if(dc==GregorianCalendar.TUESDAY) return context.getString(R.string.tuesday); | |
14 | else if(dc==GregorianCalendar.WEDNESDAY) return context.getString(R.string.wednesday); | |
15 | else if(dc==GregorianCalendar.THURSDAY) return context.getString(R.string.thursday); | |
16 | else if(dc==GregorianCalendar.FRIDAY) return context.getString(R.string.friday); | |
17 | else return context.getString(R.string.saturday); | |
18 | } | |
19 | } |