Android examples for java.util:Day
grab the day from the epoch time
//package com.java2s; import java.util.Calendar; import java.util.GregorianCalendar; public class Main { /**//from w ww .j a v a 2 s . c o m * Helper function to grab the day from the epoch time * * @param timeInMs * @return int the day of the week, starting at Sunday = 1, Saturday = 7 */ public static int parseDayOfWeek(long timeInMs) { GregorianCalendar calendar = new GregorianCalendar(); calendar.setTimeInMillis(timeInMs); System.out.println("parsedayofweek: " + calendar.get(Calendar.DAY_OF_WEEK)); return calendar.get(Calendar.DAY_OF_WEEK); } }