Date
Simple util that helps with managing dates and helps with getting certain days,months etc...
Functions
GetTodayInFormat
Date.GetTodayInFormat() → string--
Returns the formatted string
This function returns the current date in the format of mm/dd/yy
GetStringDate
Date.GetStringDate(filler: string,--
This is the string that will be inbetween every specifier you put.
...: string--
The specifiers you want to add.
) → string--
Returns the formatted string
This function allows you to format a date in any way you want by using os.date() specifiers Example:
Date.GetStringDate("/","%m","%d","%y") -- Example value would be 06/12/25
MonthTextToNumber
Date.MonthTextToNumber(month: string--
Month that you would like to be switched to a number.
) → number--
The month number
Basic function that switchs a month's name to its number Example: June -> 6
MonthNumberToText
Date.MonthNumberToText(month: number--
Month number that you would like to be switched to a name.
) → string--
The month name
Basic function that switchs a month's number to its name Example: 12 -> December
GetNextMonth
Date.GetNextMonth(month: string | number--
Month name or number
) → (string,number)--
The next month's name and number
A function that returns the month after the specified month
GetPrevMonth
Date.GetPrevMonth(month: string | number--
Month name or number
) → (string,number)--
The previous month's name and number
A function that returns the month before the specified month
IsLeapYear
Date.IsLeapYear(year: number--
The year you want to check
) → boolean--
The boolean on if the year is a leap year
A function that returns a boolean on if the specified year is a leap year
GetDaysInMonth
Date.GetDaysInMonth(month: string | number,--
The month you want to get the days from
year: number--
The year (to check if it is a leap year)
) → number--
Amount of days in specified month
A function that returns the amount of days that is in the specified month and year
Example: February 2024 would return 29