少了一个月是正常的,因为Calendar里是从0到11计月份的,所以你显示的时候得加1就ok了。

解决方案 »

  1.   

    Calendar中的月是从0开始记的,即0—11,对应1—12月。
      

  2.   

    年自然不是了,
    日是从1开始的。
    set 
    public final void set(int year,
                          int month,
                          int date) 
    Sets the values for the fields year, month, and date. Previous values of other fields are retained. If this is not desired, call clear first.
    Parameters:
    year - the value used to set the YEAR time field.
    month - the value used to set the MONTH time field. Month value is 0-based. e.g., 0 for January.
    date - the value used to set the DATE time field.
      

  3.   

    呵呵!
    楼上的都说了!
    真不知道Java 的这个类的设计者是怎么想的!
    难道和一个礼拜是从礼拜天开始的一样吗?
    合乎人民的习惯吗?
    讨论一下!