Java Calendar Setting Incorrectly

前端 未结 6 1377
离开以前
离开以前 2021-01-25 13:34

I\'m having some trouble with Java\'s Calendar. I\'m parsing some data from a txt file, and need to create a date. After completion of the following code:

tmpYea         


        
6条回答
  •  一个人的身影
    2021-01-25 14:09

    I believe the month's value starts at 0 rather than 1 so it interprets 0 as Jan, 1 as Feb ... and then Jan again as 12.

提交回复
热议问题