@Override public CharSequence getPageTitle(int position) { switch (position) { case 1: return mContext.getString(R.string.yesterday); case 2: return mContext.getString(R.string.today); case 3: return mContext.getString(R.string.tomorrow); default: LocalDate localDate = Utilities.getLocalDateForItem(position); // DateTimeFormatter fmt = DateTimeFormat.forPattern("EEEE").withLocale(Locale.UK); return localDate.dayOfWeek().getAsText(Locale.UK); } }
@Override public Fragment getItem(int position) { long millis = Utilities.getLocalDateForItem(position).toDateTimeAtStartOfDay().getMillis(); return FixturesFragment.newInstance(millis); }