News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Holiday / Calendar Pack

Started by lemur21, December 31, 2020, 03:50:03 PM

Previous topic - Next topic

lemur21

Hello,

I'm going to add some holidays (Father's Day, Mother's Day, Thanksgiving, Easter, etc.) to my forum. Has anyone ever created an easy-to-import file with these holidays and dates? Or, is the only option to add each one manually?

Steve

What version of SMF are you on?
DO NOT pm me for support!

lemur21


Steve

Then I'm confused. Doesn't your calendar for 2.0.17 already include those Holidays?
DO NOT pm me for support!

lemur21

As far as I can tell, it doesn't include holidays that move (like Father's Day, Easter, etc.)

Or, is there a place I should be looking?

Holidays on *specific* dates: Christmas, New Years, July 4th -- *are* there; but I remember having to put in floating holidays (also Jewish ones -- like Rosh Hashanah; Yom Kippur, etc.).

Steve

I checked a couple like Father's Day (in June) and it shows on whatever day it falls on from year to year.

Jewish holidays, however, aren't in the calendar.
DO NOT pm me for support!

lemur21

Interesting - Fathers Day doesn't show up in mine. When I go to "Manage Holidays" it's not listed there either ..... :/

Steve

Go to the bottom of the page when you're looking at the calendar and select June of 2009, then click 'View'. Do you still not see Father's Day listed?

Edit: I just checked June of 2020 and it's listed. But if I select 2021 or any year after that, it's not. This bears further investigating.
DO NOT pm me for support!

shadav

Quote from: Steve on January 01, 2021, 06:25:52 PM
Go to the bottom of the page when you're looking at the calendar and select June of 2009, then click 'View'. Do you still not see Father's Day listed?

Edit: I just checked June of 2020 and it's listed. But if I select 2021 or any year after that, it's not. This bears further investigating.

yeah that's something I had noticed before as well
https://www.simplemachines.org/community/index.php?topic=575168.0

though no solution really provided....though I wasn't really looking for one, just a funny observation I noticed....after 2020 there's nothing on the calendar

2.1 there is but not for 2.0

i'm guessing someone will (hopefully soonish) come up with an sql or something to run to add some for 2021+

Steve

shadav beat me to it as I was updating my test platform to 2.0.17 to verify the situation is as I said it was and it is ... and I was unaware of the topic she had started about this.

She's absolutely right, of course ... :)
DO NOT pm me for support!

lemur21

Yep - mine is set to 2040 as well; but it looks like I need to add them in manually?

As said above - the reply to the earlier inquiry on the other board was fairly noncommittal :)

Illori

in SMF 2.1 it seems to have the additional holidays ... if you do a clean install.

INSERT INTO {$db_prefix}calendar_holidays
(title, event_date)
VALUES ('New Year''s', '1004-01-01'),
('Christmas', '1004-12-25'),
('Valentine''s Day', '1004-02-14'),
('St. Patrick''s Day', '1004-03-17'),
('April Fools', '1004-04-01'),
('Earth Day', '1004-04-22'),
('United Nations Day', '1004-10-24'),
('Halloween', '1004-10-31'),
('Mother''s Day', '2010-05-09'),
('Mother''s Day', '2011-05-08'),
('Mother''s Day', '2012-05-13'),
('Mother''s Day', '2013-05-12'),
('Mother''s Day', '2014-05-11'),
('Mother''s Day', '2015-05-10'),
('Mother''s Day', '2016-05-08'),
('Mother''s Day', '2017-05-14'),
('Mother''s Day', '2018-05-13'),
('Mother''s Day', '2019-05-12'),
('Mother''s Day', '2020-05-10'),
('Mother''s Day', '2021-05-09'),
('Mother''s Day', '2022-05-08'),
('Mother''s Day', '2023-05-14'),
('Mother''s Day', '2024-05-12'),
('Mother''s Day', '2025-05-11'),
('Mother''s Day', '2026-05-10'),
('Mother''s Day', '2027-05-09'),
('Mother''s Day', '2028-05-14'),
('Mother''s Day', '2029-05-13'),
('Mother''s Day', '2030-05-12'),
('Father''s Day', '2010-06-20'),
('Father''s Day', '2011-06-19'),
('Father''s Day', '2012-06-17'),
('Father''s Day', '2013-06-16'),
('Father''s Day', '2014-06-15'),
('Father''s Day', '2015-06-21'),
('Father''s Day', '2016-06-19'),
('Father''s Day', '2017-06-18'),
('Father''s Day', '2018-06-17'),
('Father''s Day', '2019-06-16'),
('Father''s Day', '2020-06-21'),
('Father''s Day', '2021-06-20'),
('Father''s Day', '2022-06-19'),
('Father''s Day', '2023-06-18'),
('Father''s Day', '2024-06-16'),
('Father''s Day', '2025-06-15'),
('Father''s Day', '2026-06-21'),
('Father''s Day', '2027-06-20'),
('Father''s Day', '2028-06-18'),
('Father''s Day', '2029-06-17'),
('Father''s Day', '2030-06-16'),
('Summer Solstice', '2010-06-21'),
('Summer Solstice', '2011-06-21'),
('Summer Solstice', '2012-06-20'),
('Summer Solstice', '2013-06-21'),
('Summer Solstice', '2014-06-21'),
('Summer Solstice', '2015-06-21'),
('Summer Solstice', '2016-06-20'),
('Summer Solstice', '2017-06-20'),
('Summer Solstice', '2018-06-21'),
('Summer Solstice', '2019-06-21'),
('Summer Solstice', '2020-06-20'),
('Summer Solstice', '2021-06-21'),
('Summer Solstice', '2022-06-21'),
('Summer Solstice', '2023-06-21'),
('Summer Solstice', '2024-06-20'),
('Summer Solstice', '2025-06-21'),
('Summer Solstice', '2026-06-21'),
('Summer Solstice', '2027-06-21'),
('Summer Solstice', '2028-06-20'),
('Summer Solstice', '2029-06-21'),
('Summer Solstice', '2030-06-21'),
('Vernal Equinox', '2010-03-20'),
('Vernal Equinox', '2011-03-20'),
('Vernal Equinox', '2012-03-20'),
('Vernal Equinox', '2013-03-20'),
('Vernal Equinox', '2014-03-20'),
('Vernal Equinox', '2015-03-20'),
('Vernal Equinox', '2016-03-20'),
('Vernal Equinox', '2017-03-20'),
('Vernal Equinox', '2018-03-20'),
('Vernal Equinox', '2019-03-20'),
('Vernal Equinox', '2020-03-20'),
('Vernal Equinox', '2021-03-20'),
('Vernal Equinox', '2022-03-20'),
('Vernal Equinox', '2023-03-20'),
('Vernal Equinox', '2024-03-20'),
('Vernal Equinox', '2025-03-20'),
('Vernal Equinox', '2026-03-20'),
('Vernal Equinox', '2027-03-20'),
('Vernal Equinox', '2028-03-20'),
('Vernal Equinox', '2029-03-20'),
('Vernal Equinox', '2030-03-20'),
('Winter Solstice', '2010-12-21'),
('Winter Solstice', '2011-12-22'),
('Winter Solstice', '2012-12-21'),
('Winter Solstice', '2013-12-21'),
('Winter Solstice', '2014-12-21'),
('Winter Solstice', '2015-12-22'),
('Winter Solstice', '2016-12-21'),
('Winter Solstice', '2017-12-21'),
('Winter Solstice', '2018-12-21'),
('Winter Solstice', '2019-12-22'),
('Winter Solstice', '2020-12-21'),
('Winter Solstice', '2021-12-21'),
('Winter Solstice', '2022-12-21'),
('Winter Solstice', '2023-12-22'),
('Winter Solstice', '2024-12-21'),
('Winter Solstice', '2025-12-21'),
('Winter Solstice', '2026-12-21'),
('Winter Solstice', '2027-12-22'),
('Winter Solstice', '2028-12-21'),
('Winter Solstice', '2029-12-21'),
('Winter Solstice', '2030-12-21'),
('Autumnal Equinox', '2010-09-23'),
('Autumnal Equinox', '2011-09-23'),
('Autumnal Equinox', '2012-09-22'),
('Autumnal Equinox', '2013-09-22'),
('Autumnal Equinox', '2014-09-23'),
('Autumnal Equinox', '2015-09-23'),
('Autumnal Equinox', '2016-09-22'),
('Autumnal Equinox', '2017-09-22'),
('Autumnal Equinox', '2018-09-23'),
('Autumnal Equinox', '2019-09-23'),
('Autumnal Equinox', '2020-09-22'),
('Autumnal Equinox', '2021-09-22'),
('Autumnal Equinox', '2022-09-23'),
('Autumnal Equinox', '2023-09-23'),
('Autumnal Equinox', '2024-09-22'),
('Autumnal Equinox', '2025-09-22'),
('Autumnal Equinox', '2026-09-23'),
('Autumnal Equinox', '2027-09-23'),
('Autumnal Equinox', '2028-09-22'),
('Autumnal Equinox', '2029-09-22'),
('Autumnal Equinox', '2030-09-22');

INSERT INTO {$db_prefix}calendar_holidays
(title, event_date)
VALUES ('Independence Day', '1004-07-04'),
('Cinco de Mayo', '1004-05-05'),
('Flag Day', '1004-06-14'),
('Veterans Day', '1004-11-11'),
('Groundhog Day', '1004-02-02'),
('Thanksgiving', '2010-11-25'),
('Thanksgiving', '2011-11-24'),
('Thanksgiving', '2012-11-22'),
('Thanksgiving', '2013-11-28'),
('Thanksgiving', '2014-11-27'),
('Thanksgiving', '2015-11-26'),
('Thanksgiving', '2016-11-24'),
('Thanksgiving', '2017-11-23'),
('Thanksgiving', '2018-11-22'),
('Thanksgiving', '2019-11-28'),
('Thanksgiving', '2020-11-26'),
('Thanksgiving', '2021-11-25'),
('Thanksgiving', '2022-11-24'),
('Thanksgiving', '2023-11-23'),
('Thanksgiving', '2024-11-28'),
('Thanksgiving', '2025-11-27'),
('Thanksgiving', '2026-11-26'),
('Thanksgiving', '2027-11-25'),
('Thanksgiving', '2028-11-23'),
('Thanksgiving', '2029-11-22'),
('Thanksgiving', '2030-11-28'),
('Memorial Day', '2010-05-31'),
('Memorial Day', '2011-05-30'),
('Memorial Day', '2012-05-28'),
('Memorial Day', '2013-05-27'),
('Memorial Day', '2014-05-26'),
('Memorial Day', '2015-05-25'),
('Memorial Day', '2016-05-30'),
('Memorial Day', '2017-05-29'),
('Memorial Day', '2018-05-28'),
('Memorial Day', '2019-05-27'),
('Memorial Day', '2020-05-25'),
('Memorial Day', '2021-05-31'),
('Memorial Day', '2022-05-30'),
('Memorial Day', '2023-05-29'),
('Memorial Day', '2024-05-27'),
('Memorial Day', '2025-05-26'),
('Memorial Day', '2026-05-25'),
('Memorial Day', '2027-05-31'),
('Memorial Day', '2028-05-29'),
('Memorial Day', '2029-05-28'),
('Memorial Day', '2030-05-27'),
('Labor Day', '2010-09-06'),
('Labor Day', '2011-09-05'),
('Labor Day', '2012-09-03'),
('Labor Day', '2013-09-02'),
('Labor Day', '2014-09-01'),
('Labor Day', '2015-09-07'),
('Labor Day', '2016-09-05'),
('Labor Day', '2017-09-04'),
('Labor Day', '2018-09-03'),
('Labor Day', '2019-09-02'),
('Labor Day', '2020-09-07'),
('Labor Day', '2021-09-06'),
('Labor Day', '2022-09-05'),
('Labor Day', '2023-09-04'),
('Labor Day', '2024-09-02'),
('Labor Day', '2025-09-01'),
('Labor Day', '2026-09-07'),
('Labor Day', '2027-09-06'),
('Labor Day', '2028-09-04'),
('Labor Day', '2029-09-03'),
('Labor Day', '2030-09-02')


i have attached the table dump keep in mind it does include the id_holiday column which may not match with your forum if you try to use this.

lemur21

Thanks!

I had gone ahead and manually entered them in -- there were only 8 holidays (and I did it for the next 5 years) -- by then; they'll have something figured out; or I might not care anymore :) LOL

Thanks for pulling the file though. I'm definitely not ready to upgrade to 2.1 just yet .....

Illori

Quote from: lemur21 on January 02, 2021, 10:31:24 PM
Thanks for pulling the file though. I'm definitely not ready to upgrade to 2.1 just yet .....

an upgrade to SMF 2.1 will not fix this as the upgrade does not add any holidays.

shawnb61

Didn't realize there are two threads going on.

FYI...  There are two types of recurring holidays.  One has a fixed month/day, e.g., Christmas, always 12/25.  The other is like the 'second Sunday', e.g., Mother's Day. 

In 2.0, fixed month/day recurring holidays use a year of 0004, and only need to be set once.

In 2.1, 1004 is used, because 0004 fails some 'strict' DB rules (year must be non-zero & > 1000).  In 2.1, we adhere to the 'strict' DB rules, but in 2.0 we have the ability to disable them.  The upgrader will convert 0004 to 1004.

So, you only need to add the non-fixed-month-day items.  I shared 2021-2030 ones in this thread, you can just run the sql to add them to your 2.0 DB.
https://www.simplemachines.org/community/index.php?topic=575168.msg4077354#msg4077354
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Aleksi "Lex" Kilpinen

Just a note, many of those holidays differ from one country to another - Like I know at least 3 different fathers day's, and in Finland for example it's nowhere near June.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

shawnb61

Quote from: Aleksi "Lex" Kilpinen on January 04, 2021, 02:09:32 PM
Just a note, many of those holidays differ from one country to another - Like I know at least 3 different fathers day's, and in Finland for example it's nowhere near June.

Yep.  One of the reasons a bunch of new ones aren't added during an upgrade is we couldn't determine if they were desired or not...  Or if there were conflicts with ones folks had added themselves. 

The thinking is that if you really use it, you've probably been maintaining it yourself.

If nothing else, the sql shared can be a template for any bulk adds of your own. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

GigaWatt

Why not just load a clean slate on a new install? All the holidays mentioned (the fixed and the shifting) don't apply in my country. They mainly apply to Christian English speaking countries. During an upgrade, just leave everything as it is, don't change it, end of story ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Kindred

there used to be a mod which allowed a CSV to be uploaded which would a) overwrite or b) add holidays to the table from the admin interface.

I had it as part of the events mod while I supported it, back in 1.0/1.1 days...   I don't know that it ever got updated to 2.0 though
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: