Module datetime

Source

Functionsยง

change_frequency_analysis
Takes an array of numeric dates and tries to understand if the days come before the month or the other way around by looking at which number changes more frequently.
check_above_12
Takes an array of numeric dates and tries to understand if the days come before the month or the other way around by checking if numbers go above 12.
check_decreasing
Takes an array of numeric dates and tries to understand if the days come before the month or the other way around by checking if a set of numbers during the same year decrease at some point.
convert_time_12_to_24
Converts time from 12 hour format to 24 hour format.
days_before_months
Takes an array of numeric dates and tries to understand if the days come before the month or the other way around by running the dates through various checks.
group_array_by_value_at_index
Takes an array of arrays and an index and groups the inner arrays by the value at the index provided.
index_above_value
Checks that the number at a certain index of an array is greater than a certain value.
is_negative
Returns true for a negative number, false otherwise.
normalize_ampm
Normalizes am / a.m. / etc. to AM (uppercase, no other characters).
normalize_date
Takes year, month and day as strings and pads them to 4, 2, 2 digits respectively.
normalize_time
Normalizes a time string to have the following format: hh:mm:ss.
order_date_components
Pushes the longest number in a date to the end, if there is one. Necessary to ensure the year is the last number.