java日期处理

[复制链接]
查看11 | 回复1 | 2009-6-8 12:12:33 | 显示全部楼层 |阅读模式
Calendar get 的JDK 文档 public int get(int field)Returns the value of the given calendar field. In lenient mode, all calendar fields are normalized. In non-lenient mode, all calendar fields are validated and this method throws an exception if any calendar fields have out-of-range values. The normalization and validation are handled by the complete() method, which process is calendar system dependent. Parameters:field - the given calendar field. Returns:the value for the given calendar field. 这上面已经说明的够清楚了 这里用 Calendar 的两个属性 DAY_OF_WEEK,DAY_OF_MONTH 不懂hi
回复

使用道具 举报

千问 | 2009-6-8 12:12:33 | 显示全部楼层
用Calendar的get方法,里面可以传参数,去查查api
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行