Computing the Next Double Critical Day#

In this article, we will explore the concept of double critical days based on cycles of days stemming from specific dates, such as a birthday. The double critical day occurs when two of three cycles — 23 days, 28 days, and 33 days — align. Let’s break this down step by step.

Understanding the Concept#

The double critical day is defined as the first occurrence when any two of the three cycles meet after a given date. The cycles are as follows:

  • 23 days

  • 28 days

  • 33 days

Additionally, there is a mention of a triple critical day. However, it is important to note that a triple critical day is inherently a double critical day as well.

To compute these dates, we start counting from a birthday and look for the first instance after a specific event date. Our goal is to find the Least Common Multiple (LCM) of the cycles to determine the next double critical day.

Steps to Determine the Next Double Critical Day#

  1. Identify the Cycles: We have three cycles: 23, 28, and 33 days.

    cycles  23 28 33
    
  2. Use a Sign Curve Analogy: After completing their full period, the cycles cross the x-axis in the same direction. This means we are primarily interested in half the period of the cycles.

    halfPeriods  cycles ÷ 2
    
  3. Compute the Least Common Multiple (LCM):

    • We will create an LCM table to facilitate our calculations. The essential focus is on the upper right corner of this table, which provides us with the required values.

    lcmTable  (∘.halfPeriods)
    

    This provides the LCM table:

    ┌─────┬───────────────┐
    │1 2 3│ 11.5 322 379.5│
    │     │322    14 462  │
    │     │379.5 462  16.5│
    └─────┴───────────────┘
    
  4. Input Dates: For example, consider the input dates of October 31, 1962, and January 1, 2023.

    birthDate  1962 10 31
    eventDate  2023 1 1
    
  5. Transform Dates: Convert the dates into a serial format for computation. This involves creating a date-time conversion function that treats the dates as timestamps, allowing easy arithmetic operations.

    serialBirthDate  birthDate -(1⎕DT) eventDate
    

Programming the Solution#

Now that we’ve laid out the steps, let’s briefly summarize how we can program this:

  • Concatenate Date Formats: First, we will concatenate both input dates and apply the conversion function to treat them uniformly.

  • Date Calculation: We calculate the difference in days and determine how many complete cycles fit within that difference using modulus operations.

    differences  birthDate -⍨⍥(1⎕DT) eventDate
    
  • Negate for Adjustments: In some calculations, negating the right argument allows us to find dates right after critical cutoffs.

    criticalDays  (p |-) (1⎕DT) eventDate
    
  • Return the Resulting Date: Finally, we will convert the calculated date back into our desired output format.

Implementation Example#

Using example input dates of October 31, 1962, and January 1, 2023, we can follow through the outlined programming logic:

  1. Convert Dates to Serial Numbers: This allows us to work with integers rather than complex date formats.

    serialBirthDate  1962 10 31 (1⎕DT) 2023 1 1
    
  2. Perform Calculations: Using LCM and modulus, we can derive how many days away the next double critical day is from the specified date.

  3. Convert Back to Date Format: Finally, we will negate or perform necessary operations to find the next critical day and convert it back into a standard date format.

    nextDate  (3¯1⎕DT⊢+p.|-) (1⎕DT) 2023 1 1
    

Conclusion#

In summary, by following these cycles and computations, we can efficiently determine the next double critical day based on any initial date. The process primarily hinges on understanding cycles, the use of LCM, and mathematical date manipulations. This fascinating concept intertwines mathematics with calendar events, providing insightful patterns based on individual life milestones.

Thank you for exploring this topic with us!