🏠 vigrey.com

calendar_dot_exe - File README.md

calendar_dot_exe

Calendar for the NES that shows accurate calendars for the Julian, Gregorian, and Jewish calendar systems for years -999999 to +999999

[GIT] git clone git://vigrey.com/git/calendar_dot_exe

Git Repositories

Commits

Refs

LICENSE

README

RSS Feed

README.md - (14842 Bytes)

 # **Calendar\_dot\_EXE**
 
 **_"Calendar_dot_EXE" was created by Vi Grey and is licensed under the BSD 2-Clause License._**
 
 ## **DESCRIPTION**
 
 A Calendar for the Julian, Gregorian, and Jewish calendar systems that works for years -999999 to +999999.
 
 ------
 ## **RUNNING THE NES ROM ON AN EMULATOR**
 
 This NES ROM will run on essentially any NES emulator that can run Ice Climber or Donkey Kong (NROM-128), as this ROM uses the same ROM Mapper type as Ice Climber and Donkey Kong.
 
 ------
 ## **BUILDING THE NES ROM SOURCE CODE**
 
 ### Build Platforms:
 - \*BSD
 - Linux
 - macOS
 - Windows
 
 ### NES ROM Build Dependencies:
 - **asm6** (You'll probably have to build asm6 from source.  **Make sure the asm6 binary is named `asm` and that the binary is executable and accessible in your PATH**. The source code can be found at http://3dscapture.com/NES/asm6.zip)
 - **gmake** (make) (if building on \*BSD, Linux, or macOS)
 
 ### Build NES ROM on \*BSD, Linux, or macOS:
 From a terminal, go to the the main directory of this project (the directory this README.md file exists in).  You can then build the NES ROM with the following command.
 
 ```sh
 make
 ```
 
 The resulting NES ROM will be located at `bin/build/calendar_dot_exe.nes`
 
 ### Build NES ROM on Windows:
 If you are using Windows, in the command prompt (make sure to have asm6 on your system as `asm.exe`), go to the the `src` directory of this project (the `src` directory that is in the same directory this README.md file exists in).  You can then build the NES ROM with the following command.
 
 ```bat
 mkdir ..\bin\build & asm.exe calendar_dot_exe.asm ..\bin\build\calendar_dot_exe.nes
 ```
 
 Replace the `asm.exe` command with the path to your `asm6` executable.  You can either have the `asm.exe` file in the `src` directory or have it in the global **PATH**.
 
 The resulting NES ROM will be located at `bin\build\calendar_dot_exe.nes` from the main directory.
 
 
 ### Clean Build Environment on Linux:
 If you used `make` to build the NES ROM, you can run the following command while in the main directory of this project (the directory this README.md file exists in) to clean up the build environment.
 ```sh
 make clean
 ```
 
 ------
 ## **CONTROLS**
 
 ### Title Screen Controls:
 
 * **LEFT**/**RIGHT** - Move cursor left/right
 * **UP**/**DOWN** - Cycle through values where cursor is
 * **A**/**START** - Show Calendar screen of the selected calendar
 * **KONAMI CODE (UP UP DOWN DOWN LEFT RIGHT LEFT RIGHT B A)** - Unlock Parker A, Parker B, and Parker C "hidden" calendar systems
 
 ### Calendar Screen Controls:
 
 * **LEFT** - Change calendar to 1 month back
 * **RIGHT** - Change calendar to 1 month forward
 * **UP** - Change calendar to 1 year forward
 * **DOWN** - Change calendar to 1 year back
 * **B**/**START** - Go back to Title screen, with current calendar as the pre-populated calendar data
 
 
 ------
 
 ## **CALENDAR SYSTEMS**
 
 Each calendar system in this project assumes a 7 day week and extend backwards in time to well before these calendar systems existed.  It is known that the Romans used an 8 day week, but that is not in the scope of this project.
 
 The Parker A, Parker B, and Parker C calendar systems are the calendar systems described by Matt Parker (Stand-up Maths) in the following YouTube video and are "hidden" behind the Konami Code (Up Up Down Down Left Right Left Right B A) on the title screen: https://www.youtube.com/watch?v=qkt_wmRKYNQ
 
 ### Julian Calendar Rules:
 
 * If the era is AD
   * Years that are multiples of 4 are leap years (e.g. AD 8, AD 1900, AD 2020)
   * All other years are not leap years
 * If the era is BC
   * Years that are 1 more than a multiple of 4 are leap years (e.g. 9 BC, 21 BC, 33 BC)
   * All other years are not leap years
 
 ### Gregorian Calendar Rules:
 
 * If the era is AD
   * Years that are multiples of 4 are leap years (e.g. AD 8, AD 1584, AD 2020)
     * **UNLESS** the year is a multiple of 100 (e.g. AD 100, AD 600, AD 2200)
       * **UNLESS** the year is a multiple of 400 (e.g. AD 400, AD 1600, AD 2000)
   * All other years are not leap years
 * If the era is BC
   * Years that are 1 more than a multiple of 4 are leap years (e.g. 9 BC, 21 BC, 33 BC)
     * **UNLESS** the year is 1 more than a multiple of 100 (e.g. 101 BC, 601 BC, 2201 BC)
       * **UNLESS** the year is 1 more than a multiple of 400 (e.g. 1 BC, 401 BC, 2001 BC)
   * All other years are not leap years
 
 ### Roman Calendar Rules:
 
 * Dates before October 1582 follow the Julian calendar rules
 * Dates after October 1582 follow the Gregorian calendar rules
 * October 1582 begins by following the Julian calendar rules
 * The day after October 4th is October 15th
 
 ##### Roman Calendar Quirks: (Scaliger's interpretation of Macrobius's description of errors in the implementation of the Julian Calendar)
 
 * Starting 42 BC until (inclusive) 9 BC, leap years occur every 3 years instead of 4 (e.g. 42 BC, 39 BC, ..., 9 BC)
 * To correct the sync issue of calculating leap years incorrectly, there were no leap years from 8 BC to AD 5
 
 ### Jewish Calendar Rules:
 
 Hour = 1 / 24 of a day
 Chalakim = 1 / 1080 of an hour
 
 * If era is AM
   * Years with a remainder of 0, 3, 6, 8, 11, 14, or 17 when the year is divided by 19 are leap years (e.g. 8 AM, 22 AM)
   * All other years are not leap years 
 * If era is -AM
   * Years with a remainder of 1, 3, 6, 9, 12, 14, or 17 when the year is divided by 19 are leap years (e.g. 9 -AM, 20 -AM)
   * All other years are not leap years 
 * Leap years are 13 months long
 * All other years are 12 months long
 * Find Tishrei 1 of current year by finding the Molad Tishrei of the current year.  The Molad Tishrei of 2 AM was Friday 14 hours 0 chalakim
   * If era is AM
     * For every month since the Molad Tishrei of 2 AM, add 29 days 12 hours 793 chalakim
   * If era is -AM
     * For every month before the Molad Tishrei of 2 AM, subtract 29 days 12 hours 793 chalakim
   * Set Tishrei 1 to the Molad Tishrei
     * If era is AM and year is greater than 3
       * If the Molad Tishrei is on or after 18 hours 0 chalakim, postpone Tishrei 1 by 1 day
         * If Tishrei 1 is now on a Sunday, Wednesday, or Friday, postpone Tishrei 1 by 1 day
       * If the Molad Tishrei is on a Sunday, Wednesday, or Friday, postpone Tishrei 1 by 1 day
       * If the current year is not a leap year and the Molad Tishrei occurs on a Tuesday on or after 9 hours 204 chalakim, postpone Tishrei by 1 day
         * If Tishrei 1 is now on a Sunday, Wednesday, or Friday, postpone Tishrei 1 by 1 day
       * If the current year is a year after a leap year and the Molad Tishrei occurs on a Monday on or after 15 hours 889 chalakim, postpone Tishrei by 1 day
     * If era is AM and year is less than 2
       * If the Molad Tishrei is on or after 18 hours 0 chalakim, postpone Tishrei 1 by 1 day
     * If era is -AM
       * If the Molad Tishrei is on or after 18 hours 0 chalakim, postpone Tishrei 1 by 1 day
     * If era is AM and year is 3, postpone Tishrei by 1 day
 * Find Tishrei 1 of the year after the current year (same steps as above, but for the year after the current year)
 * If current year is a Leap Year
   * If next year's Tishrei 1 is the same weekday as this year's Tishrei 1, both Cheshvan and Kislev with have 30 days
   * If next year's Tishrei 1 is 1 weekday before this year's Tishrei 1, Cheshvan will have 29 days and Kislev with have 30 days
   * All other cases result in both Cheshvan and Kislev having 29 days
 * If current year is not a Leap Year
   * If next year's Tishrei 1 is 2 weekdays before this year's Tishrei 1, both Cheshvan and Kislev with have 30 days
   * If next year's Tishrei 1 is 3 weekdays before this year's Tishrei 1, Cheshvan will have 29 days and Kislev with have 30 days
   * All other cases result in both Cheshvan and Kislev having 29 days
 
 #### Jewish Calendar Rules Written in a More Human Readable Format:
 1. If the molad Tishrei occurs on a Sunday, Wednesday, or Friday, postpone Tishrei 1 by 1 day.
 2. If the molad Tishrei occurs on or after 18 hours 0 chalakim, postpone Tishrei 1 by 1 day.  If this causes Tishrei 1 to land on a Sunday, Wednesday, or Friday, postpone Tishrei 1 by a second day.
 3. If the molad Tishrei on a year that is not a leap year occurs on Tuesday at or after 9 hours 204 chalakim, postpone Tishrei 1 by 2 days.
 4. If the molad Tishrei on a year immediately after a leap year occurs on Monday at or after 15 hours 589 chalakim, postpone Tishrei 1 by 1 day.
 
 Rule 1 exists to prevent Yom Kippur from landing on a Friday or Sunday and to prevent Hoshana Rabbah from landing on a Saturday (Shabbat).  If Yom Kippur landed on a Friday, then fasting would be followed by a day where meals cannot be prepared.  If Yom Kippur landed on a Sunday, then a meal could not be prepared to break the fast on Yom Kippur the day before Yom Kippur.  Hoshana Rabbah has a tradition involving beating willow twigs, which would be considered work and could not be done on Shabbat.
 
 Rule 2 exists in order for the crescent moon to be visible on Tishrei 1.
 
 Rule 3 exists because the molad Tishrei of the following previous would have occurred on Saturday on or after 18 hours 0 chalakim, which would postpone Tishrei 1 of that year to Sunday, which would cause it to be postponed 1 more day into Monday.  That would cause the year before the next year to be 356 days, which is too long.
 
 Rule 4 exists because the molad Tishrei of the previous year would have occurred on Tuesday on or after 18 hours 0 chalakim, which would have postponed Tishrei 1 of that year to Wednesday, which would cause it to be postponed 1 more day into Thursday.  That would cause the previous year to be 382 days, which is too short.
 
 #### **WARNING - BRIEF THEOLOGICAL CONTENT FOR CONTEXT**
 
 Year 2 AM ignores rules 1, 3, and 4.  Year 2's Molad Tishrei is Friday 14 Hours 0 Chalakim, which is set at the creation time of Adam.  Being on a Friday would push Tishrei 1, even though Tishrei 1 on year 2 AM is specified as the day Adam was made.  This would normally cause an issue, but the only reason Tishrei 1 is postponed is when the Molad Tishrei is Friday or Sunday is because Yom Kippur involves a fast due to attone for the sins of the previous year.  Because Adam and Eve were not around in year 1, there would be no reason to observe Yom Kippur in year 2.  Because Yom Kippur wouldn't have been observed that year, there wouldn't be a reason to postpone Tishrei 1 by 1 day, which allows Tishrei 1 of 2 AM to be a Friday and match with the creation of Adam.
 
 Year 1 AM and all -AM years ignore rules 1, 3, and 4 for the same reason as year 2 AM, due to Yom Kippur not being observed those years.  Year 1 AM and all -AM years also ignore the Wednesday part of rule 1 as well because Hoshana Rabbah is a holiday that involves judgement for sins, which wouldn't have been committed yet.
 
 Year 3 AM is forced to ignore rules 1, 3, and 4, otherwise year 2 AM would be 356 days, which is too long.
 
 That means all of the rules apply to years 4 AM and above and only rule 2 applies to years before 4 AM.
 
 Rule 4 wouldn't actually apply to year 4 AM, due to Tishrei 1 of year 3 AM not being on a Thursday.  Rule 1 would still apply to year 4 AM though, which would cause Tishrei 1 of year 4 AM to be postponed by 1 year anyways.  Had the molad Tishrei of year 4 AM been on or after 15 hours 589 chalakim and before 18 hours 0 chalakim, an argument could easily be made that Tishrei 1 of year 4 AM should be on Monday instead of Tuesday.  Thankfully we can avoid that argument because of rule 1.
 
 #### **WARNING (FINISHED) - BRIEF THEOLOGICAL CONTENT FOR CONTEXT**
 
 ### Parker A Calendar Rules:
 
 * If era is AD
   * Years that are multiples of 4 are leap years (e.g. AD 8, AD 1584, AD 2020)
     * **UNLESS** the year is a multiple of 100 (e.g. AD 100, AD 600, AD 2200)
       * **UNLESS** the year is a multiple of 400 (e.g. AD 400, AD 1600, AD 2000)
         * **UNLESS** the year ends in 2800, 5600, or 8400 (e.g. AD 8400, AD 15600, AD 992800)
   * All other years are not leap years
 * If era is BC
   * Years that are 1 more than a multiple of 4 are leap years (e.g. 9 BC, 21 BC, 33 BC)
     * **UNLESS** the year is 1 more than a multiple of 100 (e.g. 101 BC, 601 BC, 2201 BC)
       * **UNLESS** the year is 1 more than a multiple of 400 (e.g. 1 BC, 401 BC, 2001 BC)
         * **UNLESS** the year ends in 1601, 4401, or 7201 (e.g. 7201 BC, 14401 BC, 991601 BC)
   * All other years are not leap years
 
 ### Parker B Calendar Rules:
 
 * If the era is AD
   * Years that are multiples of 4 are leap years (e.g. AD 8, AD 1900, AD 2020)
     * **UNLESS** the year is a multiple of 128 (e.g. AD 129, AD 1025, AD 2048)
   * All other years are not leap years
 * If the era is BC
   * Years that are 1 more than a multiple of 4 are leap years (e.g. 9 BC, 21 BC, 33 BC)
     * **UNLESS** the year is 1 more than a multiple of 128 (e.g. 129 BC, 1025 BC, 2049 BC)
   * All other years are not leap years
 
 ### Parker C Calendar Rules:
 
 * If the era is AD
   * Years that are multiples of 4 are leap years (e.g. AD 8, AD 1900, AD 2020)
     * **UNLESS** the year is a multiple of 128 (e.g. AD 129, AD 1025, AD 2048)
       * **UNLESS** the year is a multiple of 625024 (e.g. AD 625024)
   * All other years are not leap years
 * If the era is BC
   * Years that are 1 more than a multiple of 4 are leap years (e.g. 9 BC, 21 BC, 33 BC)
     * **UNLESS** the year is 1 more than a multiple of 128 (e.g. 129 BC, 1025 BC, 2049 BC)
       * **UNLESS** the year is 1 more than a multiple of 625024 (e.g. 1 BC, 625025 BC)
   * All other years are not leap years
 
 ------
 ## **LICENSE**
 ```
 Copyright (C) 2020-2022, Vi Grey
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
 are met:
 
     1. Redistributions of source code must retain the above copyright
        notice, this list of conditions and the following disclaimer.
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
 
 THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 SUCH DAMAGE.
 ```

Blanket Fort Webring

<< Prev - Random - Full List - Next >>

What the heck is this?