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

后端 未结 6 694
孤城傲影
孤城傲影 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:31

    Use LocalDate from JodaTime and only store the date for the birthday, not the time.

提交回复
热议问题