ClickHouse/src/Functions/toLastDayOfMonth.cpp
2022-03-10 22:30:46 +03:00

22 lines
531 B
C++

#include <Functions/FunctionFactory.h>
#include <Functions/DateTimeTransforms.h>
#include <Functions/FunctionDateOrDateTimeToSomething.h>
namespace DB
{
using FunctionToLastDayOfMonth = FunctionDateOrDateTimeToSomething<DataTypeDate, ToLastDayOfMonthImpl>;
void registerFunctionToLastDayOfMonth(FunctionFactory & factory)
{
factory.registerFunction<FunctionToLastDayOfMonth>();
/// MySQL compatibility alias.
factory.registerFunction<FunctionToLastDayOfMonth>("LAST_DAY", FunctionFactory::CaseInsensitive);
}
}