Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Conversation

@akiomik
Copy link
Contributor

@akiomik akiomik commented Dec 15, 2021

以下の対応を行いました。

  • LY-1 LQ-1 のような相対値のサポート (v2, v3)

@akiomik akiomik force-pushed the add-relative-ly-lq-support branch from 9afacd2 to 0a5f288 Compare December 15, 2021 09:08
@akiomik akiomik changed the title Add relative ly lq support [WIP] Add relative ly lq support Dec 15, 2021
@akiomik akiomik self-assigned this Dec 15, 2021
@akiomik akiomik force-pushed the add-relative-ly-lq-support branch 5 times, most recently from 20fbe6a to 37f24a7 Compare December 22, 2021 07:38
@akiomik akiomik changed the title [WIP] Add relative ly lq support Add relative ly lq support Dec 22, 2021
Comment on lines -25 to 41
): YearQuarter {
if (period.isLatestYear()) {
period.year = this.company['latest_fiscal_year']
if (period.year instanceof LyWithOffset) {
period.year = this.company['latest_fiscal_year'] + period.year.offset
}

if (period.isLatestQuarter()) {
period.quarter = this.company['latest_fiscal_quarter']
if (period.quarter instanceof LqWithOffset) {
period.year =
(period.year as number) + Math.ceil(period.quarter.offset / 4)
period.quarter =
this.company['latest_fiscal_quarter'] + (period.quarter.offset % 4)

if (period.quarter <= 0) {
period.year -= 1
period.quarter = 4 + (period.quarter as number)
}
}
Copy link
Contributor Author

@akiomik akiomik Dec 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

相対値を含むLY・LQを、 /api/v*/company のレスポンスを元に実際のFY・FQに変換するロジックです。

@akiomik akiomik force-pushed the add-relative-ly-lq-support branch from 37f24a7 to 8742a39 Compare December 22, 2021 08:29
@akiomik akiomik force-pushed the add-relative-ly-lq-support branch from 8742a39 to 60af13e Compare December 24, 2021 02:36
@akiomik
Copy link
Contributor Author

akiomik commented Dec 24, 2021

conflictがあったのでrebaseしました

@akiomik akiomik requested a review from shoe116 December 24, 2021 02:42
@akiomik akiomik mentioned this pull request Dec 24, 2021
@akiomik akiomik merged commit cf713bf into development Dec 24, 2021
@akiomik akiomik deleted the add-relative-ly-lq-support branch December 24, 2021 04:45
@akiomik akiomik mentioned this pull request Dec 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants