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

🎨 fix timeRangeSub logic #580

Merged
merged 2 commits into from
Jan 28, 2025
Merged

🎨 fix timeRangeSub logic #580

merged 2 commits into from
Jan 28, 2025

Conversation

iChemy
Copy link
Contributor

@iChemy iChemy commented Jan 16, 2025

close #579

@iChemy
Copy link
Contributor Author

iChemy commented Jan 16, 2025

typo も直しています

@iChemy
Copy link
Contributor Author

iChemy commented Jan 16, 2025

available な時間中にイベントが始まり
available の終わりと同時にイベントが終わる

のロジックで
(available の終わりと同時にイベントが終わる) の真偽を確認すべきなのに
(available の終わりと同時にイベントが始まる) を確認していた.

@iChemy iChemy requested a review from Nzt3-gh January 16, 2025 12:08
@Nzt3-gh
Copy link
Contributor

Nzt3-gh commented Jan 23, 2025

コメントで表された図がコードの意図を表していない(終わりがずれている)のも今回で直した方がいいと思います。

@iChemy
Copy link
Contributor Author

iChemy commented Jan 27, 2025

終わりがずれているのは直したのですが

意図を表していない

コメントがどれかよくわからなかったので一旦

		/*
			a: -s##########e
			b: ----s####e---
			-> -s##e----s##e
		*/

のコメントを移動して

	// 期間 b が 期間 a に包含される場合
	if a.TimeStart.Unix() <= b.TimeStart.Unix() && b.TimeEnd.Unix() <= a.TimeEnd.Unix() {

のコメントを追加してみました.

@Nzt3-gh
Copy link
Contributor

Nzt3-gh commented Jan 27, 2025

私が意図していた部分はそれで全部です。

Copy link
Contributor

@Nzt3-gh Nzt3-gh left a comment

Choose a reason for hiding this comment

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

場合分けが満たされており、コードもそれに合っていることを確認しました。

@iChemy iChemy merged commit a2651e3 into main Jan 28, 2025
6 checks passed
@iChemy iChemy deleted the fix/issue-579 branch January 28, 2025 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

部屋に0分の空き時間が生まれる
2 participants