Implement proper equinox and solstice calculation algorithm
ClosedPublic

Authored by dvratil on Aug 26 2018, 10:01 PM.

Details

Summary

Use algorithm described in Jean Meeus' Astronomical Algorithms book
to calculate exact date on which a season occurs in given year.

BUG:396750
FIXED-IN:5.50

Diff Detail

Repository
R175 KHolidays
Branch
seasons-meeus
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2273
Build 2291: arc lint + arc unit
dvratil created this revision.Aug 26 2018, 10:01 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptAug 26 2018, 10:01 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
dvratil requested review of this revision.Aug 26 2018, 10:01 PM
dvratil updated this revision to Diff 40486.Aug 26 2018, 10:41 PM
  • fix a typo in a constant
  • don't round the JD, truncate it instead
  • fix/improve comments
dvratil updated this revision to Diff 40487.Aug 26 2018, 11:07 PM
  • revert the truncate change, keep using round()

Yay Dan!
add the @since and we're good to go

src/astroseasons.h
70

@since 5.xx

dvratil updated this revision to Diff 40508.Aug 27 2018, 1:02 PM

Add @since 5.50 to the new method

winterz accepted this revision.Aug 27 2018, 2:25 PM

one last question. we are adding a static public method. should we increase the version number?

This revision is now accepted and ready to land.Aug 27 2018, 2:25 PM

I don't think we need to change anything. Adding a new static method is both source and binary compatible. And once David releases 5.50, applications that will want to use that function can depend on KHolidays >= 5.50.

This revision was automatically updated to reflect the committed changes.