Skip to content

Temporal conversion helpers

Internal routines for date normalization, week modes and numeric date arithmetic.

Internal routines for date normalization, week modes and numeric date arithmetic.

_

SignaturePurposeSource definition
mysql._calc_days_in_year(integer) → integerCount days in the given year.SQL
mysql._calc_week(qdate date, behavior integer) → integer[]Calculate the weekday or week number under MySQL week rules.SQL
mysql._calc_weekday(qdate date, sundayfirst boolean) → integerCalculate the weekday or week number under MySQL week rules.SQL
mysql._convert_format_to_halo_for_number_datetime(text) → textNormalize date/time input for conversion to text.SQL
mysql._convert_format_to_halo_for_string_datetime(text) → textNormalize date/time input for conversion to text.SQL
mysql._convert_format_to_halo_for_string_number_datetime(text) → textNormalize date/time input for conversion to text.SQL
mysql._convert_format_to_halo_for_string_string_datetime(text) → textNormalize date/time input for conversion to text.SQL
mysql._date_padding(text) → textNormalize date/time input for conversion to text.SQL
mysql._process_for_number_datetime(text) → textNormalize date/time input for conversion to text.SQL
mysql._process_for_string_number_datetime(text) → textNormalize date/time input for conversion to text.SQL
mysql._week_mode(mode integer) → integerCalculate the weekday or week number under MySQL week rules.SQL

C

SignaturePurposeSource definition
mysql.convert_to_time_format(text) → intervalNormalize date/time input for conversion to interval.SQL
mysql.curdate_add(integer) → integerApply integer arithmetic to today’s YYYYMMDD value.SQL
mysql.curdate_sub(integer) → integerApply integer arithmetic to today’s YYYYMMDD value.SQL

N

SignaturePurposeSource definition
mysql.numeric_timestamp(numeric) → timestamp without time zoneNormalize date/time input for conversion to timestamp without time zone.SQL

Function names in r4

Installation snapshot (0d51adc)r4 source (1e631f9)
mysql._convert_format_to_halo_for_number_datetimemysql._normalize_numeric_datetime
mysql._convert_format_to_halo_for_string_datetimemysql._normalize_datetime_text
mysql._convert_format_to_halo_for_string_number_datetimemysql._normalize_compact_datetime_text
mysql._convert_format_to_halo_for_string_string_datetimemysql._normalize_delimited_datetime_text