Fix comment and clear time component

This commit is contained in:
Michael B. Gale
2026-05-19 14:32:00 +01:00
parent 74374a3893
commit 7ba697a3ec

View File

@@ -129,6 +129,9 @@ export function determineSupportedRange(
apiCompatibilityData: ApiCompatibility, apiCompatibilityData: ApiCompatibility,
releases: EnterpriseReleases, releases: EnterpriseReleases,
): ApiCompatibility { ): ApiCompatibility {
// We only care about the UTC date component.
today.setUTCHours(0, 0, 0, 0);
// Our goal is to identify the oldest and newest GHES release we should support. // Our goal is to identify the oldest and newest GHES release we should support.
// We begin with `oldestSupportRelease = undefined` so that we determine the // We begin with `oldestSupportRelease = undefined` so that we determine the
// minimum from scratch and don't stick to `apiCompatibilityData.minimumVersion` // minimum from scratch and don't stick to `apiCompatibilityData.minimumVersion`
@@ -160,9 +163,9 @@ export function determineSupportedRange(
continue; continue;
} }
// If the GHES release is newer than the current, newest release we support, // Set `newestSupportedRelease` to a GHES release if it has a greater version
// check whether at least two weeks have passed since the feature freeze date // than the current `newestSupportedRelease` and the feature freeze has
// so we don't set `newestSupportedRelease` too early. // already happened or will be in the next two weeks.
if (semver.compare(releaseVersion, newestSupportedRelease) > 0) { if (semver.compare(releaseVersion, newestSupportedRelease) > 0) {
const featureFreezeDate = new Date(releaseData.feature_freeze); const featureFreezeDate = new Date(releaseData.feature_freeze);
if (featureFreezeDate < addWeeks(today, 2)) { if (featureFreezeDate < addWeeks(today, 2)) {