Skip to content

Treat date and datetime as atomic #77

@derlin

Description

@derlin

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions