Skip to content

Bugs in TimeTerm #5

Description

@igorcadelima

Hi, @jomifred

I believe that there are a couple of bugs in the TimeTerm class:

  • The time calculation using years is wrong as it considers years as having 356 days, which is never true
  • Assuming that the point above was a typing mistake when you intended to type 365, that'd still be wrong as it doesn't consider leap years
  • The calculations don't consider daylight savings

Joda-Time is a Java library you might want to take a look at as it allows you to perform time calculations seamlessly.

Cheers,
Igor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions