mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
fix(dates): upgrade dynamic end dating for quest bundle endings (#15015)
* fix(quest text): Updated end date for Oddballs to November 30. * fix(dates): remove hard-coded bundle end-dates * fix(dates): add dynamic dating to end of quest bundles * fix(dates): commas are important * fix(dates): November only has 30 days * fix(dates): upgrade dynamic end dating for quest bundle endings
This commit is contained in:
@@ -12,7 +12,7 @@ const bundles = {
|
||||
featheredFriends: {
|
||||
key: 'featheredFriends',
|
||||
text: t('featheredFriendsText'),
|
||||
notes: t('featheredFriendsNotes'),
|
||||
notes: t('featheredFriendsNotes', { date: moment(EVENTS.bundle202309.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'falcon',
|
||||
'harpy',
|
||||
@@ -29,7 +29,7 @@ const bundles = {
|
||||
splashyPals: {
|
||||
key: 'splashyPals',
|
||||
text: t('splashyPalsText'),
|
||||
notes: t('splashyPalsNotes'),
|
||||
notes: t('splashyPalsNotes', { date: moment(EVENTS.bundle202306.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'dilatory_derby',
|
||||
'turtle',
|
||||
@@ -46,7 +46,7 @@ const bundles = {
|
||||
farmFriends: {
|
||||
key: 'farmFriends',
|
||||
text: t('farmFriendsText'),
|
||||
notes: t('farmFriendsNotes'),
|
||||
notes: t('farmFriendsNotes', { date: moment(EVENTS.bundle202209.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'cow',
|
||||
'horse',
|
||||
@@ -62,7 +62,7 @@ const bundles = {
|
||||
witchyFamiliars: {
|
||||
key: 'witchyFamiliars',
|
||||
text: t('witchyFamiliarsText'),
|
||||
notes: t('witchyFamiliarsNotes'),
|
||||
notes: t('witchyFamiliarsNotes', { date: moment(EVENTS.bundle202210.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'rat',
|
||||
'spider',
|
||||
@@ -78,7 +78,7 @@ const bundles = {
|
||||
winterQuests: {
|
||||
key: 'winterQuests',
|
||||
text: t('winterQuestsText'),
|
||||
notes: t('winterQuestsNotes'),
|
||||
notes: t('winterQuestsNotes', { date: moment(EVENTS.winter2023.end).format('LL') }),
|
||||
addlNotes: t('evilSantaAddlNotes'),
|
||||
bundleKeys: [
|
||||
'evilsanta',
|
||||
@@ -95,7 +95,7 @@ const bundles = {
|
||||
hugabug: {
|
||||
key: 'hugabug',
|
||||
text: t('hugabugText'),
|
||||
notes: t('hugabugNotes'),
|
||||
notes: t('hugabugNotes', { date: moment(EVENTS.bundle202308.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'snail',
|
||||
'beetle',
|
||||
@@ -110,7 +110,7 @@ const bundles = {
|
||||
cuddleBuddies: {
|
||||
key: 'cuddleBuddies',
|
||||
text: t('cuddleBuddiesText'),
|
||||
notes: t('cuddleBuddiesNotes'),
|
||||
notes: t('cuddleBuddiesNotes', { date: moment('2022-03-31').format('LL') }), // needs update next time we run this
|
||||
bundleKeys: [
|
||||
'bunny',
|
||||
'ferret',
|
||||
@@ -125,7 +125,7 @@ const bundles = {
|
||||
aquaticAmigos: {
|
||||
key: 'aquaticAmigos',
|
||||
text: t('aquaticAmigosText'),
|
||||
notes: t('aquaticAmigosNotes'),
|
||||
notes: t('aquaticAmigosNotes', { date: moment(EVENTS.bundle202206.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'axolotl',
|
||||
'kraken',
|
||||
@@ -133,7 +133,7 @@ const bundles = {
|
||||
],
|
||||
event: EVENTS.bundle202206,
|
||||
canBuy () {
|
||||
return moment().isBefore(EVENTS.bundle202206.end);
|
||||
return moment().isBetween(EVENTS.bundle202206.start, EVENTS.bundle202206.end);
|
||||
},
|
||||
type: 'quests',
|
||||
value: 7,
|
||||
@@ -141,7 +141,7 @@ const bundles = {
|
||||
forestFriends: {
|
||||
key: 'forestFriends',
|
||||
text: t('forestFriendsText'),
|
||||
notes: t('forestFriendsNotes'),
|
||||
notes: t('forestFriendsNotes', { date: moment(EVENTS.bundle202208.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'ghost_stag',
|
||||
'hedgehog',
|
||||
@@ -157,7 +157,7 @@ const bundles = {
|
||||
oddballs: {
|
||||
key: 'oddballs',
|
||||
text: t('oddballsText'),
|
||||
notes: t('oddballsNotes'),
|
||||
notes: t('oddballsNotes', { date: moment(EVENTS.bundle202311.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'slime',
|
||||
'rock',
|
||||
@@ -173,7 +173,7 @@ const bundles = {
|
||||
birdBuddies: {
|
||||
key: 'birdBuddies',
|
||||
text: t('birdBuddiesText'),
|
||||
notes: t('birdBuddiesNotes'),
|
||||
notes: t('birdBuddiesNotes', { date: moment(EVENTS.bundle202305.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'peacock',
|
||||
'penguin',
|
||||
@@ -181,7 +181,7 @@ const bundles = {
|
||||
],
|
||||
event: EVENTS.bundle202305,
|
||||
canBuy () {
|
||||
return moment().isBefore(EVENTS.bundle202305.end);
|
||||
return moment().isBetween(EVENTS.bundle202305.start, EVENTS.bundle202305.end);
|
||||
},
|
||||
type: 'quests',
|
||||
value: 7,
|
||||
@@ -189,7 +189,7 @@ const bundles = {
|
||||
mythicalMarvels: {
|
||||
key: 'mythicalMarvels',
|
||||
text: t('mythicalMarvelsText'),
|
||||
notes: t('mythicalMarvelsNotes'),
|
||||
notes: t('mythicalMarvelsNotes', { date: moment(EVENTS.bundle202302.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'unicorn',
|
||||
'seaserpent',
|
||||
@@ -205,7 +205,7 @@ const bundles = {
|
||||
rockingReptiles: {
|
||||
key: 'rockingReptiles',
|
||||
text: t('rockingReptilesText'),
|
||||
notes: t('rockingReptilesNotes'),
|
||||
notes: t('rockingReptilesNotes', { date: moment(EVENTS.bundle202211.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'alligator',
|
||||
'snake',
|
||||
@@ -221,7 +221,7 @@ const bundles = {
|
||||
delightfulDinos: {
|
||||
key: 'delightfulDinos',
|
||||
text: t('delightfulDinosText'),
|
||||
notes: t('delightfulDinosNotes'),
|
||||
notes: t('delightfulDinosNotes', { date: moment('2022-05-31').format('LL') }), // needs update next time its run
|
||||
bundleKeys: [
|
||||
'pterodactyl',
|
||||
'triceratops',
|
||||
@@ -236,7 +236,7 @@ const bundles = {
|
||||
jungleBuddies: {
|
||||
key: 'jungleBuddies',
|
||||
text: t('jungleBuddiesText'),
|
||||
notes: t('jungleBuddiesNotes', { date: moment('2023-03-31').format('LL') }),
|
||||
notes: t('jungleBuddiesNotes', { date: moment(EVENTS.bundle202303.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'monkey',
|
||||
'sloth',
|
||||
@@ -252,7 +252,7 @@ const bundles = {
|
||||
sandySidekicks: {
|
||||
key: 'sandySidekicks',
|
||||
text: t('sandySidekicksText'),
|
||||
notes: t('sandySidekicksNotes', { date: moment('2023-10-31').format('LL') }),
|
||||
notes: t('sandySidekicksNotes', { date: moment(EVENTS.bundle202310.end).format('LL') }),
|
||||
bundleKeys: [
|
||||
'armadillo',
|
||||
'snake',
|
||||
|
||||
Reference in New Issue
Block a user