Calendar的时间设定分开成year,month,date等
来源:互联网 发布:淘宝部分退款 编辑:程序博客网 时间:2024/05/18 01:04
/priceBacks.do?method=Parentpayfeeviewall&fromflag=left //传入的方法后定义了一个临时的属性=left
String fromflag=request.getParameter("fromflag");
if("left".equals(fromflag)){
this.removeActionFormFromScope(request,mapping); //清空request
parentpayfeeForm.clear(); //清空Form
Calendar c=Calendar.getInstance(); //Calendar是抽象类,用里面的方法getInstance(),得到实例化,相当于普通类的new得到实例化
c.setTime(new Date()); //设定时间
String year=c.get(c.YEAR)+""; //得到时间并且转型成String类型
}
//清楚request的方法
protected void removeActionFormFromScope(HttpServletRequest request,ActionMapping mapping){
if("request".equals(mapping.getScope())){
request.removeAttribute(mapping.getAttribute());
}else if{
request.getSession().removeAttribute(mapping.getAttribute());
}
}
//Form里的清零方法
public void clear(){
this.id=null;
this.month=null;
this.parentid=null;
this.parentname=null;
this.banknumber=null;
this.nowmonthpayfee=null;
this.nopayfee=null;
this.changefee=null;
this.nextmonthpayfee=null;
this.nowpayfee=null;
this.paystate=null;
this.remark=null;
}
- Calendar的时间设定分开成year,month,date等
- Calendar:它为特定瞬间与一组诸如 YEAR、MONTH、DAY_OF_MONTH、HOUR 等 日历字段
- 一阶段-fourteenWork-2-使用Date的Date(int year, int month, int date) 构造方法
- Java Calendar,Date,DateFormat,TimeZone,Locale等时间相关内容的认知和使用(1) Calendar
- Java Calendar,Date,DateFormat,TimeZone,Locale等时间相关内容的认知和使用(1) Calendar
- Java Calendar,Date,DateFormat,TimeZone,Locale等时间相关内容的认知和使用(3) Date
- java Date(int year,int month,int date)需要注意
- Java Calendar,Date,DateFormat,TimeZone,Locale等时间相关内容的认知和使用(2) 自己封装的Calendar接口
- date,String,calendar等之间的转换
- Java Calendar,Date,DateFormat,TimeZone,Locale等时间相关内容的认知和使用(1) Calendar - 跨到对岸去
- Java Calendar,Date,DateFormat,TimeZone,Locale等时间相关内容的认知和使用(4) DateFormat
- Java Calendar,Date,DateFormat,TimeZone,Locale等时间相关内容的认知和使用(5) SimpleDateFormat
- Java Calendar,Date,DateFormat,TimeZone,Locale等时间相关内容的认知和使用(6) Locale
- Java Calendar,Date,DateFormat,TimeZone,Locale等时间相关内容的认知和使用(7) TimeZone
- 利用DateFormat、Date、Calendar等类 对含有时间的字符串进行提取和计算
- 提供开始和结束的时间戳 返回中间的day month year格式
- SQL day() 、month()、year()的应用
- 时间日历:Date、Calendar
- 中文参数传递编码后传递乱码解决(java.net.URLEncoder.encode)
- 最有可能改变我们未来10年生活方式的20项重要发明
- flex ItemRenderer 模版组件事件
- Oracle一些日期时间的计算
- Ogre + windows
- Calendar的时间设定分开成year,month,date等
- javascript小技巧 超强推荐
- 批处理高级应用
- 工信部:年内实现乡乡能上网
- Spring AOP execution 切入点表达式
- Delphi安装问题
- 【BASH】判断命令是否成功执行
- MyGUI 的中文显示
- 十分钟的悲剧