Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite end of month / same day conventions #9

Open
asladeofgreen opened this issue Oct 9, 2023 · 1 comment
Open

Rewrite end of month / same day conventions #9

asladeofgreen opened this issue Oct 9, 2023 · 1 comment
Assignees
Labels
p-high High level priority v2.0 Technical Spec 2.0

Comments

@asladeofgreen
Copy link
Member

No description provided.

@asladeofgreen asladeofgreen added the p-high High level priority label Oct 9, 2023
@asladeofgreen asladeofgreen added the v2.0 Technical Spec 2.0 label Oct 9, 2023
@Avi-D-coder
Copy link

Extracted from my actus-rs comments:

In the Java a EOMC only applies to periods of months, not days, weeks, or years.
The data dictionary docs above implies that EOMC applies quarters as well.
Quarters, and Half years are not distinct concepts in the Java.

EOM

If EndOfMonth is specified, but the anchor date is not the last day of the month,
then the Java silently ignores the EOMC, and uses the SameDay convention.
I think applying it to all periods is more reasonable.

SD

SameDay does not check that cyclic dates fall on the same day of the month.
In the Java SameDay::shift = id.

This means that you cannot specify a recurrence on the 30th if your cycle anchor is in February.

Solution

EOMC::NoShift should be added.
SameDay should be replaced with a semantically sound definition.

A ShiftTowards(DayOFMonth) convention could replace both EOM and SameDay.
ShiftTowards is more general, it's semantically sound, it can shift towards any day of the month, and plays better with non whole month cycle periods.

Under the new conventions ShiftTowards(31) = EOM, ShiftTowards(30) is a well defined version of SameDay sans the CycleAnchor != 30 case which would be represented as NoShift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p-high High level priority v2.0 Technical Spec 2.0
Projects
None yet
Development

No branches or pull requests

2 participants