pretty-print
pretty-print copied to clipboard
Treat date and datetime as atomic
When using e.g. LocalDate, the result of pp looks like:
dateOfBirth = LocalDate(
MIN = LocalDate.<static cyclic class reference>
MAX = LocalDate.<static cyclic class reference>
EPOCH = LocalDate.<static cyclic class reference>
serialVersionUID = 2942565459149668126
DAYS_PER_CYCLE = 146097
DAYS_0000_TO_1970 = 719528
year = 1988
month = 6
day = 13
)
while the output of toString is way more relevant for debug purposes:
"1988-06-13"
I suggest adding Date, LocalDate, DateTime and LocalDateTime to the list of atomic classes, so that their toString method is used instead.
(P.S: I would like to take this issue for the hacktoberfest 2021 if you are interested in this enhancement).
Oh goodness, I completely missed this issue. I'm sorry about that. This is a great ticket. If you want to take it you totally can. I probably won't have time to add this for a while.