Files
yankee-gnome-fire-publisher/utils.py

21 lines
480 B
Python
Raw Normal View History

2025-03-10 10:38:18 -04:00
import calendar
import random
def randomizeArray(arr):
"""
Returns a new randomized array without modifying the original.
"""
new_arr = arr[:] # Create a copy of the original array
random.shuffle(new_arr)
return new_arr
def convertMonthNumberMonthLong(month_number):
if not 1 <= month_number <= 12:
raise ValueError("Invalid month number")
month_name = calendar.month_name[month_number].lower().strip()
return f"{month_name}"