我需要从时间戳对象中检索日期和月份作为长数字:
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
}
Run Code Online (Sandbox Code Playgroud)
born_date 是一个时间戳对象.
有可能吗?
提前致谢.
我需要使用JSTL select语句实现一个switch case,我有树不同的选择.任何人都知道下面的代码不起作用的原因?
提前致谢.
<c:choose>
<c:when test="${iUserInfo.identification_card_type}==0">
<option selected="selected">Carta di Identità</option>
<option>Passaporto</option>
<option>Patente di Guida</option>
</c:when>
<c:when test="${iUserInfo.identification_card_type}==1">
<option>Carta di Identità</option>
<option selected="selected">Passaporto</option>
<option>Patente di Guida</option>
</c:when>
<c:when test="${iUserInfo.identification_card_type}==2">
<option>Carta di Identità</option>
<option>Passaporto</option>
<option selected="selected">Patente di Guida</option>
</c:when>
<c:otherwise>
<option>Scegli...</option>
<option>Carta di Identità</option>
<option>Passaporto</option>
<option>Patente di Guida</option>
</c:otherwise>
</c:choose>
Run Code Online (Sandbox Code Playgroud)