I необходимо получить день года и месяц из объекта отметки времени в виде длинных чисел:
public long getTimeStampDay()
{
String iDate = new SimpleDateFormat("dd/MM/yyyy")
.format(new Date(born_date.getDate()));
.....
return day; //just the day
}
public long getTimeStampMonth()
{
String iDate = new SimpleDateFormat("dd/MM/yyyy")
.format(new Date(born_date.getDate()));
.....
return month; //just month
}
public long getTimeStampYear()
{
String iDate = new SimpleDateFormat("dd/MM/yyyy")
.format(new Date(born_date.getDate()));
.....
return year; //just year
}
born_date
- объект отметки времени.
Возможно ли это сделать?
Заранее спасибо.