-
October 22nd, 2021, 08:40 #1
- Join Date
- Jan 2017
- Posts
- 23
Help with formatting .lua file for a calendar with an intercalary month
I'm currently working on drafting a custom calendar for my world and I'm about 95% of the way finished, but I keep running into issues with the implementation of an intercalary month. Specifically, I'm having issues with the day of the week being properly calculated for the month immediately proceeding the intercalary month.
I want the intercalary month to last 5 days (6 days in a leap year that occurs every 4 years), and I want this month to occur between the 6th and 7th months of the calendar. The days of the week line up as they should through the first 6 months and the intercalary month (e.g. the last day of a month being a Friday leads to the first day of the next month being a Monday), but when the intercalary month ends, the first day in the 7th month of the calendar resets to whatever the first day was for the start of the year. For example, in year 1, the intercalary month ends on a Friday, but then the 7th month begins on a Wednesday.
What changes will I have to make to the .lua file to get the days to display properly?
I have attached the .lua file and the db.xml files for the calendar to this post, but I have provided the specific details of the calendar below should they be needed:
- Total Months: 12
- Days per month: 30
- Days in intercalary month: 5 (6 during leap years that occur every 4 years)
- Days per week: 7
-
October 23rd, 2021, 04:45 #2
- Join Date
- Jan 2017
- Posts
- 23
Alright, so a quick update: I was able to figure out how to code the week days to read correctly, but now I'm running into a different issue. When I'm outputting the date, Fantasy Grounds is adding the wrong suffix to certain days of the month. Specifically, it is changing the 11th, 12th, and 13th to the 11st, 12nd, and 13rd respectively. Is there any way to fix this? I have attached a screenshot of the issue if that helps.
-
October 23rd, 2021, 04:52 #3
Lots of calendar customization tips in this thread. Plus if you post there Mattekure is likely to see it and jump in to help. https://www.fantasygrounds.com/forum...endar-Tutorial
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
-
October 25th, 2021, 01:27 #4
- Join Date
- Jan 2017
- Posts
- 23
Thanks! I'll post my issue there.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks