adding days to a date

后端 未结 2 465
[愿得一人]
[愿得一人] 2021-01-04 21:28

I have a program that needs to start on 1/1/09 and when I start a new day, my program will show the next day. This is what I have so far:

GregorianCalendar s         


        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-04 21:56

    If you can swing it requirement wise, move all your date/time needs to JODA, which is a much better library, with the added bonus that almost everything is immutable, meaning multithreading comes in for free.

提交回复
热议问题