How would you represent date of birth in your java model?

后端 未结 6 659
孤城傲影
孤城傲影 2020-12-16 01:56

And wait, don\'t rush to answer \"java.util.Date\", consider the following scenario.

Person object having 2 fields: \"birthday\" and \"nextMeeting\" both java.util.D

6条回答
  •  温柔的废话
    2020-12-16 02:23

    if you are dealing with dates, you are better of using joda time. You can build a DateTime object with date/time and timezone info so you have all info needed to deal with different timezones.

提交回复
热议问题