My custom Solar Calculator
```
"""
Sunrise and Sunset Calculator

This script calculates the sunrise and sunset times for a given location (latitude and longitude) and date.
The calculation accounts for the date's day of the year and timezone adjustments.
It uses astronomical calculations derived from the NOAA solar calculator and,
relies on custom implementations of trigonometric functions (sin, cos, tan, asin, acos, atan) based on Taylor series expansions.
Most importantly, it uses no external libraries, making it a self-contained solution.

Resources:
- Trigonometric function implementations based on Taylor series:
  - https://en.wikipedia.org/wiki/Taylor_series#Trigonometric_functions
- Sunrise and sunset calculation algorithm:
  - https://en.wikipedia.org/wiki/Sunrise_equation
  - https://www.aa.quae.nl/en/reken/zonpositie.html
  - https://gml.noaa.gov/grad/solcalc/solareqns.PDF
"""

# Define constants
PI = 3.14159265358979323846264338327950288419716939937510  # Pi to high precision
EPSILON = 1e-15  # Threshold for term convergence in series expansions

def radians(degrees):
    """
    Convert degrees to radians.

    Parameters:
        degrees (float): Angle in degrees.

    Returns:
        float: Angle in radians.
    """
    return degrees * PI / 180

def degrees(radians):
    """
    Convert radians to degrees.

    Parameters:
        radians (float): Angle in radians.

    Returns:
        float: Angle in degrees.
    """
    return radians * 180 / PI

def sin(x):
    """
    Calculate the sine of x (in degrees) using Taylor series expansion.

    Parameters:
        x (float): The angle in degrees.

    Returns:
        float: The sine of the angle.
    """
    # Convert degrees to radians
    x = radians(x)
    
    # Range reduction to improve convergence: bring x within (-π, π]
    x = x % (2 * PI)
    if x > PI:
        x -= (2 * PI)
    
    # Initialize variables for Taylor series
    term = x  # First term of the series (x^1 / 1!)
    sin_x = term
    n = 1  # Term counter
    
    # Maximum number of terms to compute
    max_terms = 10
    
    while n < max_terms:
        # Compute the next term using the recurrence relation
        term *= -x * x / ((2 * n) * (2 * n + 1))
        sin_x += term
        
        # Check if the current term is small enough to stop
        if abs(term) < EPSILON:
            break
        n += 1
    
    return sin_x

def cos(x):
    """
    Calculate the cosine of x (in degrees) using Taylor series expansion.

    Parameters:
        x (float): The angle in degrees.

    Returns:
        float: The cosine of the angle.
    """
    # Convert degrees to radians
    x = radians(x)
    
    # Range reduction to improve convergence: bring x within (-π, π]
    x = x % (2 * PI)
    if x > PI:
        x -= (2 * PI)
    
    # Initialize variables for Taylor series
    term = 1.0  # First term of the series (x^0 / 0!)
    cos_x = term
    n = 1  # Term counter
    
    # Maximum number of terms to compute
    max_terms = 10
    
    while n < max_terms:
        # Compute the next term using the recurrence relation
        term *= -x * x / ((2 * n - 1) * (2 * n))
        cos_x += term
        
        # Check if the current term is small enough to stop
        if abs(term) < EPSILON:
            break
        n += 1
    
    return cos_x

def tan(x):
    """
    Calculate the tangent of x (in degrees) using sine and cosine functions.

    Parameters:
        x (float): The angle in degrees.

    Returns:
        float: The tangent of the angle.

    Raises:
        ValueError: If cosine of x is zero (tan is undefined).
    """
    cosine = cos(x)
    if abs(cosine) < EPSILON:
        raise ValueError("Tangent undefined for angles where cosine is zero.")
    return sin(x) / cosine

def asin(x):
    """
    Calculate the arcsine of x using Taylor series expansion.

    Parameters:
        x (float): The value for which to compute arcsin. Must be in [-1, 1].

    Returns:
        float: The arcsine of x in degrees.

    Raises:
        ValueError: If x is outside the domain [-1, 1].
    """
    # Check if input is within the valid domain
    if x < -1.0 or x > 1.0:
        raise ValueError("asin(x) is undefined for |x| > 1.")
    
    # Handle special cases
    if x == 1.0:
        return (PI / 2)  # π/2
    if x == -1.0:
        return -(PI / 2)  # -π/2
    if x == 0.0:
        return 0.0
    
    # Initialize variables for Taylor series (in radians)
    term = x  # First term of the series
    asin_x = term
    n = 1  # Term counter
    
    # Maximum number of terms to compute
    max_terms = 10
    
    while n < max_terms:
        # Compute the coefficient for the current term
        coeff = ((2 * n - 1) ** 2) / ((2 * n) * (2 * n + 1))
        # Update the term using the recurrence relation
        term *= coeff * x * x
        asin_x += term
        
        # Check if the current term is small enough to stop
        if abs(term) < EPSILON:
            break
        n += 1
    
    # Convert the result from radians to degrees
    return degrees(asin_x)

def acos(x):
    """
    Calculate the arccosine of x using Taylor series expansion.

    Parameters:
        x (float): The value for which to compute arccos. Must be in [-1, 1].

    Returns:
        float: The arccosine of x in degrees.

    Raises:
        ValueError: If x is outside the domain [-1, 1].
    """
    # Check if input is within the valid domain
    if x < -1.0 or x > 1.0:
        raise ValueError("acos(x) is undefined for |x| > 1.")
    
    # Handle special cases
    if x == 1.0:
        return 0.0
    if x == -1.0:
        return (PI)
    if x == 0.0:
        return (PI / 2)  # π/2
    
    # Initialize variables for Taylor series (in radians)
    term = x  # First term of the series
    sum_terms = term
    n = 1  # Term counter
    
    # Maximum number of terms to compute
    max_terms = 10
    
    while n < max_terms:
        # Compute the coefficient for the current term
        coeff = ((2 * n - 1) ** 2) / ((2 * n) * (2 * n + 1))
        # Update the term using the recurrence relation
        term *= coeff * x * x
        sum_terms += term
        
        # Check if the current term is small enough to stop
        if abs(term) < EPSILON:
            break
        n += 1
    
    # Convert the result from radians to degrees
    return degrees(PI / 2 - sum_terms)

def atan(x):
    """
    Calculate the arctangent of x using Taylor series expansion.

    Parameters:
        x (float): The value for which to compute arctan.

    Returns:
        float: The arctangent of x in degrees.

    Raises:
        ValueError: If the input is not a real number.
    """
    # Handle special case where x is 0
    if x == 0.0:
        return 0.0
    
    # Determine the sign of x
    sign = 1
    if x < 0:
        sign = -1
        x = -x  # Work with positive x for simplicity
    
    result = 0.0  # Initialize result
    
    if x <= 1.0:
        # Use Taylor series expansion for |x| <= 1
        term = x  # First term of the series
        result += term
        n = 1  # Term counter
        max_terms = 10
               
        while n < max_terms:
            # Compute the next term using the recurrence relation
            term *= -x * x
            current_term = term / (2 * n + 1)
            result += current_term
            
            # Check if the current term is small enough to stop
            if abs(current_term) < EPSILON:
                break
            n += 1
    else:
        # Use identity arctan(x) = π/2 - arctan(1/x) for x > 1
        reciprocal = 1.0 / x
        term = reciprocal  # First term of the series for arctan(1/x)
        result = (PI / 2) - term
        n = 1  # Term counter
        max_terms = 10
        
        while n < max_terms:
            # Compute the next term using the recurrence relation
            term *= -reciprocal * reciprocal
            current_term = term / (2 * n + 1)
            result -= current_term
            
            # Check if the current term is small enough to stop
            if abs(current_term) < EPSILON:
                break
            n += 1
    
    # Convert the result from radians to degrees and apply the original sign
    return degrees(sign * result)

def mod(a, b):
    """
    Compute the modulus of a and b.

    Parameters:
        a (float): Dividend.
        b (float): Divisor.

    Returns:
        float: The modulus of a by b.
    """
    return a % b

def is_leap_year(year):
    """
    Determine if a given year is a leap year.

    Parameters:
        year (int): The year to check.

    Returns:
        int: 1 if leap year, 0 otherwise.
    """
    return int(year % 4 == 0 and (year % 100 != 0 or year % 400 == 0))

def day_of_year(year, month, day):
    """
    Calculate the day of the year for a given date.

    Parameters:
        year (int): The year of the date.
        month (int): The month of the date.
        day (int): The day of the date.

    Returns:
        int: The day of the year (1-366).
    """
    # Days in each month, accounting for leap years in February
    month_days = [31, 28 + is_leap_year(year), 31, 30, 31, 30,
                  31, 31, 30, 31, 30, 31]
    
    if day > month_days[month - 1]:
        raise ValueError("Invalid day for the given month.")
    
    return sum(month_days[:month - 1]) + day

def adjust_quadrant(RA, L):
    """
    Adjust the right ascension (RA) to the correct quadrant based on the Sun's true longitude (L).

    Parameters:
        RA (float): Right ascension in degrees.
        L (float): Sun's true longitude in degrees.

    Returns:
        float: Adjusted right ascension in degrees.
    """
    # Ensure both RA and L are within 0-360 degrees
    RA = mod(RA, 360)
    L = mod(L, 360)
    
    # Determine the current quadrants
    L_quadrant  = (int(L / 90)) * 90
    RA_quadrant = (int(RA / 90)) * 90
    
    # Adjust RA to be in the same quadrant as L
    RA = RA + (L_quadrant - RA_quadrant)
    return mod(RA, 360)

def format_time(time_in_hours, seconds=False):
    """
    Format time from decimal hours to HH:MM:SS AM/PM format.

    Parameters:
        time_in_hours (float): Time in decimal hours.

    Returns:
        str: Formatted time string.
    """        
    hour = int(time_in_hours)
    remainder = time_in_hours - hour
    minute = int(remainder * 60)
    second = int((remainder * 60 - minute) * 60)
            
    if not seconds:
        if second >= 30:
            minute += 1
        second = 0
        
    if seconds >= 60:
        minute += 1
        second = 0
    if minute >= 60:
        hour += 1
        minute = 0
    
    if not seconds:
        if second >= 30:
            minute += 1
        second = 0
    
    # Determine AM or PM
    meridiem = "AM" if hour < 12 else "PM"
    # Convert to 12-hour format
    hour_display = hour % 12
    if hour_display == 0:
        hour_display = 12
    
    if seconds:
        return f"{hour_display}:{minute:02d}:{second:02d} {meridiem}"
    else:
        return f"{hour_display}:{minute:02d} {meridiem}"

def calculate_sunrise_sunset(latitude, longitude, year, month, day, timezone_offset=0):
    """
    Calculate sunrise and sunset times for a given location and date.

    Parameters:
        latitude (float): Latitude in decimal degrees (positive for north, negative for south).
        longitude (float): Longitude in decimal degrees (positive for east, negative for west).
        year (int): Year of the date.
        month (int): Month of the date.
        day (int): Day of the date.
        timezone_offset (float): Offset from UTC in hours.

    Returns:
        tuple: Sunrise and sunset times in decimal hours (0-24), adjusted for timezone.
               Returns (None, None) if the sun does not rise or set on the given date/location.
    """
    N = day_of_year(year, month, day)  # Day of the year
    
    # Convert longitude to hour value and calculate approximate time
    lng_hour = longitude / 15.0
    
    # Calculate approximate times for sunrise and sunset
    t_rise = N + ((6 - lng_hour) / 24)
    t_set = N + ((18 - lng_hour) / 24)
    
    # Calculate the Sun's mean anomaly
    M_rise = (0.9856 * t_rise) - 3.289
    M_set = (0.9856 * t_set) - 3.289
    
    # Calculate the Sun's true longitude
    # L = M + (1.916 * sin(M)) + (0.020 * sin(2*M)) + 282.634
    L_rise = mod(M_rise + (1.916 * sin(M_rise)) + (0.020 * sin(2 * M_rise)) + 282.634, 360)
    L_set = mod(M_set + (1.916 * sin(M_set)) + (0.020 * sin(2 * M_set)) + 282.634, 360)
    
    # Calculate the Sun's right ascension
    RA_rise = mod(atan(0.91764 * tan(L_rise)), 360)
    RA_set = mod(atan(0.91764 * tan(L_set)), 360)
    
    # Adjust the right ascension to the correct quadrant
    RA_rise = adjust_quadrant(RA_rise, L_rise)
    RA_set = adjust_quadrant(RA_set, L_set)
    
    # Convert RA from degrees to hours
    RA_rise /= 15.0
    RA_set /= 15.0
    
    # Calculate the Sun's declination
    # sin_dec = 0.39782 * sin(L)
    sin_dec_rise = 0.39782 * sin(L_rise)
    cos_dec_rise = cos(asin(sin_dec_rise))
    
    sin_dec_set = 0.39782 * sin(L_set)
    cos_dec_set = cos(asin(sin_dec_set))
    
    zenith = 90.833  # Official zenith for sunrise/sunset
    
    # Calculate the Sun's local hour angle
    # cos_h = (cos(zenith) - sin_dec * sin(latitude)) / (cos_dec * cos(latitude))
    cos_h_rise = (cos(zenith) - (sin_dec_rise * sin(latitude))) / (cos_dec_rise * cos(latitude))
    cos_h_set = (cos(zenith) - (sin_dec_set * sin(latitude))) / (cos_dec_set * cos(latitude))
    
    # Check for polar day/night
    if cos_h_rise > 1 or cos_h_set > 1:
        # The sun never rises or sets on this location and date (Arctic/Antarctic)
        return None, None
    
    # Calculate the local hour angle in degrees
    H_rise = (360 - acos(cos_h_rise)) / 15.0  # Sunrise hour angle
    H_set = acos(cos_h_set) / 15.0            # Sunset hour angle
    
    # Calculate local mean time of rising and setting
    # T = H + RA - (0.06571 * t) - 6.622
    T_rise = H_rise + RA_rise - (0.06571 * t_rise) - 6.622
    T_set = H_set + RA_set - (0.06571 * t_set) - 6.622
    
    # Convert to UTC
    UT_rise = mod(T_rise - lng_hour, 24)
    UT_set = mod(T_set - lng_hour, 24)
    
    # Adjust for timezone (no Daylight Saving Time considerations as of now)
    sunrise_time = mod(UT_rise + timezone_offset, 24)
    sunset_time = mod(UT_set + timezone_offset, 24)
    
    return sunrise_time, sunset_time

if __name__ == "__main__":
    # Location coordinates
    latitude  = 13.0326372542501    # Latitude in degrees (positive for north)
    longitude = 77.5755860908572    # Longitude in degrees (positive for east)
    
    # Date and timezone information
    day, month, year = 32, 12, 2024
    timezone_offset = 0  # UTC offset in hours (e.g., IST is UTC+5.5)
    
    # Calculate sunrise and sunset times
    sunrise, sunset = calculate_sunrise_sunset(latitude, longitude, year, month, day, timezone_offset)
    
    if sunrise is not None and sunset is not None:
        # Format and display the results
        print(f"Sunrise: {format_time(sunrise)}")
        print(f"Sunset: {format_time(sunset)}")
    else:
        # Handle cases where sunrise or sunset does not occur
        print("Sunrise and sunset times not available for this location on the given date.")
```

Astral Calculator
```
from astral import LocationInfo
from astral.sun import sun
from datetime import datetime, timedelta
import pytz

def round_time(dt):
    if dt.second >= 30:
        return dt.replace(second=0, microsecond=0) + timedelta(minutes=1)
    return dt.replace(second=0, microsecond=0)

def calculate_sunrise_sunset_astral(latitude, longitude, timezone, date=None):
    if date is None:
        date = datetime.now()
    timezone = pytz.timezone(timezone)
    location = LocationInfo(latitude=latitude, longitude=longitude, timezone=timezone.zone)
    s = sun(location.observer, date=date, tzinfo=timezone)
    # sunrise = round_time(s['sunrise'])
    # sunset = round_time(s['sunset'])
    sunrise = s['sunrise']
    sunset = s['sunset']
    return sunrise, sunset

if __name__ == "__main__":
    # Example coordinates (e.g., New York City)
    # Location coordinates
    latitude  = 13.0326372542501    # Latitude in degrees (positive for north)
    longitude = 77.5755860908572    # Longitude in degrees (positive for east)
    
    # Date and timezone information
    day, month, year = 31, 12, 2024
    
    date = datetime(year, month, day)
    timezone = 'UTC'
    sunrise, sunset = calculate_sunrise_sunset_astral(latitude, longitude, timezone, date)
    sunrise_str = sunrise.strftime("%dth %B %Y %I:%M %p")
    sunset_str = sunset.strftime("%dth %B %Y %I:%M %p")
    print(f"Sunrise: {sunrise_str}")
    print(f"Sunset: {sunset_str}")
```

Testing code
```
from solar_calculator import calculate_sunrise_sunset, format_time
from testbed import calculate_sunrise_sunset_astral
from datetime import datetime

if __name__ == "__main__":
    # Location coordinates
    latitude  = 13.0326372542501    # Latitude in degrees (positive for north)
    longitude = 77.5755860908572    # Longitude in degrees (positive for east)
    
    # Date and timezone information
    _, _, year = 31, 12, 2024
    timezone_offset = 0  # UTC offset in hours (e.g., IST is UTC+5.5)
    timezone = 'UTC'
    
    for month in range(3, 5):
        print(f"{'-' * 50}")
        print(f"Month: {month}")
        for day in range(1, 31):
            print(f'Day: {day}')
            # Calculate sunrise and sunset times
            sunrise, sunset = calculate_sunrise_sunset(latitude, longitude, year, month, day, timezone_offset)
            
            if sunrise is not None and sunset is not None:
                # Format and display the results
                print(f"Sunrise Custom: {format_time(sunrise, seconds=True)}")
                print(f"Sunset Custom: {format_time(sunset, seconds=True)}")
            else:
                # Handle cases where sunrise or sunset does not occur
                print("Sunrise and sunset times not available for this location on the given date.")
                
            date = datetime(year, month, day)
            sunrise_astral, sunset_astral = calculate_sunrise_sunset_astral(latitude, longitude, timezone, date)
            sunrise_astral_str = sunrise_astral.strftime("%dth %B %Y %I:%M %p")
            sunset_astral_str = sunset_astral.strftime("%dth %B %Y %I:%M %p")
            print(f"Sunrise Astral: {sunrise_astral_str}")
            print(f"Sunset Astral: {sunset_astral_str}")
            print(f"{'-' * 50}")
```

Results
```
PS C:\InfinityX\Automa\Sunset> & C:/Users/themy/AppData/Local/Programs/Python/Python312/python.exe c:/InfinityX/Automa/Sunset/test.py
--------------------------------------------------
Month: 3
Day: 1
Sunrise Custom: 1:05:30 AM
Sunset Custom: 12:58:42 PM
Sunrise Astral: 01th March 2024 01:05 AM
Sunset Astral: 01th March 2024 12:58 PM
--------------------------------------------------
Day: 2
Sunrise Custom: 1:04:56 AM
Sunset Custom: 12:58:51 PM
Sunrise Astral: 02th March 2024 01:05 AM
Sunset Astral: 02th March 2024 12:58 PM
--------------------------------------------------
Day: 3
Sunrise Custom: 1:04:22 AM
Sunset Custom: 12:59:00 PM
Sunrise Astral: 03th March 2024 01:04 AM
Sunset Astral: 03th March 2024 12:58 PM
--------------------------------------------------
Day: 4
Sunrise Custom: 1:03:47 AM
Sunset Custom: 12:59:08 PM
Sunrise Astral: 04th March 2024 01:03 AM
Sunset Astral: 04th March 2024 12:58 PM
--------------------------------------------------
Day: 5
Sunrise Custom: 1:03:12 AM
Sunset Custom: 12:59:16 PM
Sunrise Astral: 05th March 2024 01:03 AM
Sunset Astral: 05th March 2024 12:58 PM
--------------------------------------------------
Day: 6
Sunrise Custom: 1:02:37 AM
Sunset Custom: 12:59:23 PM
Sunrise Astral: 06th March 2024 01:02 AM
Sunset Astral: 06th March 2024 12:59 PM
--------------------------------------------------
Day: 7
Sunrise Custom: 1:02:01 AM
Sunset Custom: 12:59:30 PM
Sunrise Astral: 07th March 2024 01:02 AM
Sunset Astral: 07th March 2024 12:59 PM
--------------------------------------------------
Day: 8
Sunrise Custom: 1:01:24 AM
Sunset Custom: 12:59:37 PM
Sunrise Astral: 08th March 2024 01:01 AM
Sunset Astral: 08th March 2024 12:59 PM
--------------------------------------------------
Day: 9
Sunrise Custom: 1:00:48 AM
Sunset Custom: 12:59:44 PM
Sunrise Astral: 09th March 2024 01:00 AM
Sunset Astral: 09th March 2024 12:59 PM
--------------------------------------------------
Day: 10
Sunrise Custom: 1:00:10 AM
Sunset Custom: 12:59:50 PM
Sunrise Astral: 10th March 2024 01:00 AM
Sunset Astral: 10th March 2024 12:59 PM
--------------------------------------------------
Day: 11
Sunrise Custom: 12:59:33 AM
Sunset Custom: 12:59:56 PM
Sunrise Astral: 11th March 2024 12:59 AM
Sunset Astral: 11th March 2024 12:59 PM
--------------------------------------------------
Day: 12
Sunrise Custom: 12:58:55 AM
Sunset Custom: 1:00:01 PM
Sunrise Astral: 12th March 2024 12:59 AM
Sunset Astral: 12th March 2024 12:59 PM
--------------------------------------------------
Day: 13
Sunrise Custom: 12:58:17 AM
Sunset Custom: 1:00:07 PM
Sunrise Astral: 13th March 2024 12:58 AM
Sunset Astral: 13th March 2024 12:59 PM
--------------------------------------------------
Day: 14
Sunrise Custom: 12:57:38 AM
Sunset Custom: 1:00:12 PM
Sunrise Astral: 14th March 2024 12:57 AM
Sunset Astral: 14th March 2024 12:59 PM
--------------------------------------------------
Day: 15
Sunrise Custom: 12:56:59 AM
Sunset Custom: 1:00:17 PM
Sunrise Astral: 15th March 2024 12:57 AM
Sunset Astral: 15th March 2024 12:59 PM
--------------------------------------------------
Day: 16
Sunrise Custom: 12:56:21 AM
Sunset Custom: 1:00:22 PM
Sunrise Astral: 16th March 2024 12:56 AM
Sunset Astral: 16th March 2024 01:00 PM
--------------------------------------------------
Day: 17
Sunrise Custom: 12:55:41 AM
Sunset Custom: 1:00:26 PM
Sunrise Astral: 17th March 2024 12:55 AM
Sunset Astral: 17th March 2024 01:00 PM
--------------------------------------------------
Day: 18
Sunrise Custom: 12:55:02 AM
Sunset Custom: 1:00:31 PM
Sunrise Astral: 18th March 2024 12:55 AM
Sunset Astral: 18th March 2024 01:00 PM
--------------------------------------------------
Day: 19
Sunrise Custom: 12:54:22 AM
Sunset Custom: 1:00:35 PM
Sunrise Astral: 19th March 2024 12:54 AM
Sunset Astral: 19th March 2024 01:00 PM
--------------------------------------------------
Day: 20
Sunrise Custom: 12:53:43 AM
Sunset Custom: 1:00:39 PM
Sunrise Astral: 20th March 2024 12:53 AM
Sunset Astral: 20th March 2024 01:00 PM
--------------------------------------------------
Day: 21
Sunrise Custom: 12:53:03 AM
Sunset Custom: 1:00:43 PM
Sunrise Astral: 21th March 2024 12:53 AM
Sunset Astral: 21th March 2024 01:00 PM
--------------------------------------------------
Day: 22
Sunrise Custom: 12:52:23 AM
Sunset Custom: 1:00:47 PM
Sunrise Astral: 22th March 2024 12:52 AM
Sunset Astral: 22th March 2024 01:00 PM
--------------------------------------------------
Day: 23
Sunrise Custom: 12:51:43 AM
Sunset Custom: 1:00:51 PM
Sunrise Astral: 23th March 2024 12:51 AM
Sunset Astral: 23th March 2024 01:00 PM
--------------------------------------------------
Day: 24
Sunrise Custom: 12:51:03 AM
Sunset Custom: 1:00:55 PM
Sunrise Astral: 24th March 2024 12:51 AM
Sunset Astral: 24th March 2024 01:00 PM
--------------------------------------------------
Day: 25
Sunrise Custom: 12:50:23 AM
Sunset Custom: 1:00:58 PM
Sunrise Astral: 25th March 2024 12:50 AM
Sunset Astral: 25th March 2024 01:00 PM
--------------------------------------------------
Day: 26
Sunrise Custom: 12:49:43 AM
Sunset Custom: 1:01:02 PM
Sunrise Astral: 26th March 2024 12:49 AM
Sunset Astral: 26th March 2024 01:00 PM
--------------------------------------------------
Day: 27
Sunrise Custom: 12:49:03 AM
Sunset Custom: 1:01:06 PM
Sunrise Astral: 27th March 2024 12:49 AM
Sunset Astral: 27th March 2024 01:00 PM
--------------------------------------------------
Day: 28
Sunrise Custom: 12:48:23 AM
Sunset Custom: 1:01:09 PM
Sunrise Astral: 28th March 2024 12:48 AM
Sunset Astral: 28th March 2024 01:00 PM
--------------------------------------------------
Day: 29
Sunrise Custom: 12:47:43 AM
Sunset Custom: 1:01:13 PM
Sunrise Astral: 29th March 2024 12:47 AM
Sunset Astral: 29th March 2024 01:00 PM
--------------------------------------------------
Day: 30
Sunrise Custom: 12:47:03 AM
Sunset Custom: 1:01:17 PM
Sunrise Astral: 30th March 2024 12:47 AM
Sunset Astral: 30th March 2024 01:01 PM
--------------------------------------------------
--------------------------------------------------
Month: 4
Day: 1
Sunrise Custom: 12:45:44 AM
Sunset Custom: 1:01:25 PM
Sunrise Astral: 01th April 2024 12:45 AM
Sunset Astral: 01th April 2024 01:01 PM
--------------------------------------------------
Day: 2
Sunrise Custom: 12:45:04 AM
Sunset Custom: 1:01:28 PM
Sunrise Astral: 02th April 2024 12:45 AM
Sunset Astral: 02th April 2024 01:01 PM
--------------------------------------------------
Day: 3
Sunrise Custom: 12:44:25 AM
Sunset Custom: 1:01:32 PM
Sunrise Astral: 03th April 2024 12:44 AM
Sunset Astral: 03th April 2024 01:01 PM
--------------------------------------------------
Day: 4
Sunrise Custom: 12:43:46 AM
Sunset Custom: 1:01:37 PM
Sunrise Astral: 04th April 2024 12:43 AM
Sunset Astral: 04th April 2024 01:01 PM
--------------------------------------------------
Day: 5
Sunrise Custom: 12:43:07 AM
Sunset Custom: 1:01:41 PM
Sunrise Astral: 05th April 2024 12:43 AM
Sunset Astral: 05th April 2024 01:01 PM
--------------------------------------------------
Day: 6
Sunrise Custom: 12:42:29 AM
Sunset Custom: 1:01:45 PM
Sunrise Astral: 06th April 2024 12:42 AM
Sunset Astral: 06th April 2024 01:01 PM
--------------------------------------------------
Day: 7
Sunrise Custom: 12:41:50 AM
Sunset Custom: 1:01:50 PM
Sunrise Astral: 07th April 2024 12:42 AM
Sunset Astral: 07th April 2024 01:01 PM
--------------------------------------------------
Day: 8
Sunrise Custom: 12:41:12 AM
Sunset Custom: 1:01:54 PM
Sunrise Astral: 08th April 2024 12:41 AM
Sunset Astral: 08th April 2024 01:01 PM
--------------------------------------------------
Day: 9
Sunrise Custom: 12:40:35 AM
Sunset Custom: 1:01:59 PM
Sunrise Astral: 09th April 2024 12:40 AM
Sunset Astral: 09th April 2024 01:01 PM
--------------------------------------------------
Day: 10
Sunrise Custom: 12:39:57 AM
Sunset Custom: 1:02:04 PM
Sunrise Astral: 10th April 2024 12:40 AM
Sunset Astral: 10th April 2024 01:01 PM
--------------------------------------------------
Day: 11
Sunrise Custom: 12:39:20 AM
Sunset Custom: 1:02:10 PM
Sunrise Astral: 11th April 2024 12:39 AM
Sunset Astral: 11th April 2024 01:01 PM
--------------------------------------------------
Day: 12
Sunrise Custom: 12:38:44 AM
Sunset Custom: 1:02:15 PM
Sunrise Astral: 12th April 2024 12:38 AM
Sunset Astral: 12th April 2024 01:02 PM
--------------------------------------------------
Day: 13
Sunrise Custom: 12:38:08 AM
Sunset Custom: 1:02:21 PM
Sunrise Astral: 13th April 2024 12:38 AM
Sunset Astral: 13th April 2024 01:02 PM
--------------------------------------------------
Day: 14
Sunrise Custom: 12:37:32 AM
Sunset Custom: 1:02:27 PM
Sunrise Astral: 14th April 2024 12:37 AM
Sunset Astral: 14th April 2024 01:02 PM
--------------------------------------------------
Day: 15
Sunrise Custom: 12:36:57 AM
Sunset Custom: 1:02:33 PM
Sunrise Astral: 15th April 2024 12:37 AM
Sunset Astral: 15th April 2024 01:02 PM
--------------------------------------------------
Day: 16
Sunrise Custom: 12:36:22 AM
Sunset Custom: 1:02:40 PM
Sunrise Astral: 16th April 2024 12:36 AM
Sunset Astral: 16th April 2024 01:02 PM
--------------------------------------------------
Day: 17
Sunrise Custom: 12:35:47 AM
Sunset Custom: 1:02:46 PM
Sunrise Astral: 17th April 2024 12:36 AM
Sunset Astral: 17th April 2024 01:02 PM
--------------------------------------------------
Day: 18
Sunrise Custom: 12:35:13 AM
Sunset Custom: 1:02:53 PM
Sunrise Astral: 18th April 2024 12:35 AM
Sunset Astral: 18th April 2024 01:02 PM
--------------------------------------------------
Day: 19
Sunrise Custom: 12:34:40 AM
Sunset Custom: 1:03:01 PM
Sunrise Astral: 19th April 2024 12:34 AM
Sunset Astral: 19th April 2024 01:02 PM
--------------------------------------------------
Day: 20
Sunrise Custom: 12:34:07 AM
Sunset Custom: 1:03:08 PM
Sunrise Astral: 20th April 2024 12:34 AM
Sunset Astral: 20th April 2024 01:02 PM
--------------------------------------------------
Day: 21
Sunrise Custom: 12:33:35 AM
Sunset Custom: 1:03:16 PM
Sunrise Astral: 21th April 2024 12:33 AM
Sunset Astral: 21th April 2024 01:03 PM
--------------------------------------------------
Day: 22
Sunrise Custom: 12:33:03 AM
Sunset Custom: 1:03:24 PM
Sunrise Astral: 22th April 2024 12:33 AM
Sunset Astral: 22th April 2024 01:03 PM
--------------------------------------------------
Day: 23
Sunrise Custom: 12:32:32 AM
Sunset Custom: 1:03:33 PM
Sunrise Astral: 23th April 2024 12:32 AM
Sunset Astral: 23th April 2024 01:03 PM
--------------------------------------------------
Day: 24
Sunrise Custom: 12:32:02 AM
Sunset Custom: 1:03:42 PM
Sunrise Astral: 24th April 2024 12:32 AM
Sunset Astral: 24th April 2024 01:03 PM
--------------------------------------------------
Day: 25
Sunrise Custom: 12:31:32 AM
Sunset Custom: 1:03:51 PM
Sunrise Astral: 25th April 2024 12:31 AM
Sunset Astral: 25th April 2024 01:03 PM
--------------------------------------------------
Day: 26
Sunrise Custom: 12:31:03 AM
Sunset Custom: 1:04:00 PM
Sunrise Astral: 26th April 2024 12:31 AM
Sunset Astral: 26th April 2024 01:03 PM
--------------------------------------------------
Day: 27
Sunrise Custom: 12:30:34 AM
Sunset Custom: 1:04:10 PM
Sunrise Astral: 27th April 2024 12:30 AM
Sunset Astral: 27th April 2024 01:03 PM
--------------------------------------------------
Day: 28
Sunrise Custom: 12:30:06 AM
Sunset Custom: 1:04:20 PM
Sunrise Astral: 28th April 2024 12:30 AM
Sunset Astral: 28th April 2024 01:04 PM
--------------------------------------------------
Day: 29
Sunrise Custom: 12:29:38 AM
Sunset Custom: 1:04:29 PM
Sunrise Astral: 29th April 2024 12:29 AM
Sunset Astral: 29th April 2024 01:04 PM
--------------------------------------------------
Day: 30
Sunrise Custom: 12:29:11 AM
Sunset Custom: 1:04:39 PM
Sunrise Astral: 30th April 2024 12:29 AM
Sunset Astral: 30th April 2024 01:04 PM
--------------------------------------------------
PS C:\InfinityX\Automa\Sunset> 
```

Why is there a bit of discrepancy between mine and astral version? How to make mine more accurate? I promise you changing the math functions to module math (math.cos,. etc...) it did not increase accuracy, so that's not the cause. Please fix my code to be more accurate. Thanks! Ensure you do not import anything (no imports, pure custom code)