java Calendar get(calendar.MONTH) returns 0 -
why calendar.get(calendar.month) homecoming 0(zero) here: ?
date date = new simpledateformat("yyyy-mm-dd").parse("2013-02-12"); calendar calendar = calendar.getinstance(); calendar.settime(date); system.out.println( calendar.get(calendar.month) ); // 0 ??
mm
month , mm
minute. utilize format - yyyy-mm-dd
, desired output 1
.
date date = new simpledateformat("yyyy-mm-dd").parse("2013-02-12");
java
No comments:
Post a Comment