5E Product Walkthrough Playlist
  1. #1

    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
    Attached Files Attached Files

  2. #2
    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.
    Attached Images Attached Images

  3. #3
    LordEntrails's Avatar
    Join Date
    May 2015
    -7 UTC
    Blog Entries
    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

  4. #4
    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)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
SWADE Playlist

Log in

Log in