REVERT ._.

This commit is contained in:
Phillip Thelen
2024-06-11 19:00:34 +02:00
parent a00f199d18
commit 10a27354bb

View File

@@ -2,13 +2,12 @@ import defaults from 'lodash/defaults';
import find from 'lodash/find';
import forEach from 'lodash/forEach';
import moment from 'moment';
import nconf from 'nconf';
import upperFirst from 'lodash/upperFirst';
import { ownsItem } from '../gear-helper';
import { ATTRIBUTES } from '../../../constants';
import t from '../../translation';
import memoize from '../../../fns/datedMemoize';
import { ARMOIRE_RELEASE_DATES as releaseDates } from '../../constants/release_dates';
import { buildReleaseDate } from '../../is_released';
const armor = {
lunarArmor: {
@@ -1834,7 +1833,19 @@ const weapon = {
},
};
const SWITCHOVER_TIME = nconf.get('CONTENT_SWITCHOVER_TIME_OFFSET') || 0;
const releaseDay = 7;
const releaseDates = {
somethingSpooky: { year: 2023, month: 10 },
cookingImplementsTwo: { year: 2023, month: 11 },
greenTrapper: { year: 2023, month: 12 },
schoolUniform: { year: 2024, month: 1 },
whiteLoungeWear: { year: 2024, month: 2 },
hatterSet: { year: 2024, month: 3 },
optimistSet: { year: 2024, month: 4 },
pottersSet: { year: 2024, month: 5 },
beachsideSet: { year: 2024, month: 6 },
};
forEach({
armor,
@@ -1879,12 +1890,12 @@ forEach({
function updateReleased (type) {
const today = moment();
const releaseDateEndPart = `${String(releaseDay).padStart(2, '0')}T${String(SWITCHOVER_TIME).padStart(2, '0')}:00-0500`;
const returnType = {};
forEach(type, (gearItem, gearKey) => {
let released;
if (releaseDates[gearItem.set]) {
const components = releaseDates[gearItem.set];
const releaseDateString = buildReleaseDate(components.year, components.month, releaseDay);
const releaseDateString = `${releaseDates[gearItem.set].year}-${String(releaseDates[gearItem.set].month).padStart(2, '0')}-${releaseDateEndPart}`;
released = today.isAfter(releaseDateString);
} else {
released = true;