mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Squashed commit of the following:
commit22dc77c029Author: Kalista Payne <sabe@habitica.com> Date: Tue Sep 17 20:34:00 2024 -0500 fix(event): remove UTC wording commitc72b5dbbeeAuthor: Kalista Payne <sabe@habitica.com> Date: Tue Sep 17 20:23:49 2024 -0500 fix(sale): use native JS for showing tz info
This commit is contained in:
@@ -183,11 +183,10 @@
|
|||||||
eventStartMonth: eventInfo.startMonth,
|
eventStartMonth: eventInfo.startMonth,
|
||||||
eventStartOrdinal: eventInfo.startOrdinal,
|
eventStartOrdinal: eventInfo.startOrdinal,
|
||||||
eventStartTime: eventInfo.startTime,
|
eventStartTime: eventInfo.startTime,
|
||||||
eventStartUTC: eventInfo.startUTC,
|
|
||||||
eventEndMonth: eventInfo.endMonth,
|
eventEndMonth: eventInfo.endMonth,
|
||||||
eventEndOrdinal: eventInfo.endOrdinal,
|
eventEndOrdinal: eventInfo.endOrdinal,
|
||||||
eventEndTime: eventInfo.endTime,
|
eventEndTime: eventInfo.endTime,
|
||||||
eventEndUTC: eventInfo.endUTC,
|
timeZone: eventInfo.timeZoneAbbrev,
|
||||||
}) }}
|
}) }}
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
@@ -445,19 +444,24 @@ export default {
|
|||||||
);
|
);
|
||||||
if (!currentEvent) return null;
|
if (!currentEvent) return null;
|
||||||
|
|
||||||
|
// https://stackoverflow.com/questions/1954397/detect-timezone-abbreviation-using-javascript#answer-66180857
|
||||||
|
const timeZoneAbbrev = new Intl.DateTimeFormat('en-us', { timeZoneName: 'short' })
|
||||||
|
.formatToParts(new Date())
|
||||||
|
.find(part => part.type === 'timeZoneName')
|
||||||
|
.value;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: currentEvent.event,
|
name: currentEvent.event,
|
||||||
class: currentEvent.gemsPromo ? `event-${currentEvent.event}` : '',
|
class: currentEvent.gemsPromo ? `event-${currentEvent.event}` : '',
|
||||||
gemsPromo: currentEvent.gemsPromo,
|
gemsPromo: currentEvent.gemsPromo,
|
||||||
promo: currentEvent.promo,
|
promo: currentEvent.promo,
|
||||||
|
timeZoneAbbrev,
|
||||||
startMonth: moment(currentEvent.start).format('MMMM'),
|
startMonth: moment(currentEvent.start).format('MMMM'),
|
||||||
startOrdinal: moment(currentEvent.start).format('Do'),
|
startOrdinal: moment(currentEvent.start).format('Do'),
|
||||||
startTime: moment(currentEvent.start).format('hh:mm A'),
|
startTime: moment(currentEvent.start).format('hh:mm A'),
|
||||||
startUTC: moment(currentEvent.start).utc().format('hh:mm A'),
|
|
||||||
endMonth: moment(currentEvent.end).format('MMMM'),
|
endMonth: moment(currentEvent.end).format('MMMM'),
|
||||||
endOrdinal: moment(currentEvent.end).format('Do'),
|
endOrdinal: moment(currentEvent.end).format('Do'),
|
||||||
endTime: moment(currentEvent.end).format('hh:mm A'),
|
endTime: moment(currentEvent.end).format('hh:mm A'),
|
||||||
endUTC: moment(currentEvent.end).utc().format('hh:mm A'),
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
isGemsPromoActive () {
|
isGemsPromoActive () {
|
||||||
|
|||||||
@@ -238,7 +238,7 @@
|
|||||||
"g1g1Limitations": "This is a limited time event that starts on <%= promoStartMonth %> <%= promoStartOrdinal %> at <%= promoStartTime %> and will end <%= promoEndMonth %> <%= promoEndOrdinal %> at <%= promoEndTime %>. This promotion only applies when you gift to another Habitican. If you or your gift recipient already have a subscription, the gifted subscription will add months of credit that will only be used after the current subscription is canceled or expires.",
|
"g1g1Limitations": "This is a limited time event that starts on <%= promoStartMonth %> <%= promoStartOrdinal %> at <%= promoStartTime %> and will end <%= promoEndMonth %> <%= promoEndOrdinal %> at <%= promoEndTime %>. This promotion only applies when you gift to another Habitican. If you or your gift recipient already have a subscription, the gifted subscription will add months of credit that will only be used after the current subscription is canceled or expires.",
|
||||||
"noLongerAvailable": "This item is no longer available.",
|
"noLongerAvailable": "This item is no longer available.",
|
||||||
"gemSaleHow": "Between <%= eventStartMonth %> <%= eventStartOrdinal %> and <%= eventEndOrdinal %>, simply purchase any Gem bundle like usual and your account will be credited with the promotional amount of Gems. More Gems to spend, share, or save for any future releases!",
|
"gemSaleHow": "Between <%= eventStartMonth %> <%= eventStartOrdinal %> and <%= eventEndOrdinal %>, simply purchase any Gem bundle like usual and your account will be credited with the promotional amount of Gems. More Gems to spend, share, or save for any future releases!",
|
||||||
"gemSaleLimitationsText": "This promotion only applies during the limited time event. This event starts on <%= eventStartMonth %> <%= eventStartOrdinal %> at <%= eventStartTime %> local time (<%= eventStartUTC %> UTC) and will end <%= eventEndMonth %> <%= eventEndOrdinal %> at <%= eventEndTime %> local time (<%= eventEndUTC %> UTC). The promo offer is only available when buying Gems for yourself.",
|
"gemSaleLimitationsText": "This promotion only applies during the limited time event. This event starts on <%= eventStartMonth %> <%= eventStartOrdinal %> at <%= eventStartTime %> <%= timeZone %> and will end on <%= eventEndMonth %> <%= eventEndOrdinal %> at <%= eventEndTime %> <%= timeZone %>. The promo offer is only available when buying Gems for yourself.",
|
||||||
"anniversaryLimitations": "This is a limited time event that starts on January 30th at 8:00 AM ET (13:00 UTC) and will end February 8th at 11:59 PM ET (04:59 UTC). The Limited Edition Jubilant Gryphatrice and ten Magic Hatching Potions will be available to buy during this time. The other Gifts listed in the Four for Free section will be automatically delivered to all accounts that were active in the 30 days prior to day the gift is sent. Accounts created after the gifts are sent will not be able to claim them.",
|
"anniversaryLimitations": "This is a limited time event that starts on January 30th at 8:00 AM ET (13:00 UTC) and will end February 8th at 11:59 PM ET (04:59 UTC). The Limited Edition Jubilant Gryphatrice and ten Magic Hatching Potions will be available to buy during this time. The other Gifts listed in the Four for Free section will be automatically delivered to all accounts that were active in the 30 days prior to day the gift is sent. Accounts created after the gifts are sent will not be able to claim them.",
|
||||||
"anniversaryLimitedDates": "January 30th to February 8th",
|
"anniversaryLimitedDates": "January 30th to February 8th",
|
||||||
"limitedEvent": "Limited Event",
|
"limitedEvent": "Limited Event",
|
||||||
|
|||||||
@@ -76,23 +76,6 @@ export const REPEATING_EVENTS = {
|
|||||||
end: new Date('1970-08-02T03:59-04:00'),
|
end: new Date('1970-08-02T03:59-04:00'),
|
||||||
foodSeason: 'Cake',
|
foodSeason: 'Cake',
|
||||||
},
|
},
|
||||||
fallGemFest: {
|
|
||||||
start: new Date('1970-09-23T04:00-04:00'),
|
|
||||||
end: new Date('1970-09-27T23:59-04:00'),
|
|
||||||
gemsPromo,
|
|
||||||
},
|
|
||||||
spookyGemFest: {
|
|
||||||
start: new Date('1970-10-28T04:00-04:00'),
|
|
||||||
end: new Date('1970-11-01T23:59-04:00'),
|
|
||||||
gemsPromo,
|
|
||||||
},
|
|
||||||
habitoween: {
|
|
||||||
start: new Date('1970-10-30T04:00-04:00'),
|
|
||||||
end: new Date('1970-11-01T23:59-04:00'),
|
|
||||||
foodSeason: 'Candy',
|
|
||||||
season: 'habitoween',
|
|
||||||
npcImageSuffix: '_halloween',
|
|
||||||
},
|
|
||||||
fallGemSale: {
|
fallGemSale: {
|
||||||
start: new Date('1970-09-23T04:00-04:00'),
|
start: new Date('1970-09-23T04:00-04:00'),
|
||||||
end: new Date('1970-09-27T23:59-04:00'),
|
end: new Date('1970-09-27T23:59-04:00'),
|
||||||
@@ -105,6 +88,13 @@ export const REPEATING_EVENTS = {
|
|||||||
event: 'spooky_extra_gems',
|
event: 'spooky_extra_gems',
|
||||||
gemsPromo,
|
gemsPromo,
|
||||||
},
|
},
|
||||||
|
habitoween: {
|
||||||
|
start: new Date('1970-10-30T04:00-04:00'),
|
||||||
|
end: new Date('1970-11-01T23:59-04:00'),
|
||||||
|
foodSeason: 'Candy',
|
||||||
|
season: 'habitoween',
|
||||||
|
npcImageSuffix: '_halloween',
|
||||||
|
},
|
||||||
harvestFeast: {
|
harvestFeast: {
|
||||||
start: new Date('1970-11-20T04:00-05:00'),
|
start: new Date('1970-11-20T04:00-05:00'),
|
||||||
end: new Date('1970-12-01T03:59-05:00'),
|
end: new Date('1970-12-01T03:59-05:00'),
|
||||||
|
|||||||
Reference in New Issue
Block a user