presto-main/src/main/java/io/prestosql/operator/scalar/DateTimeFunctions.java/DateTimeFunctions/dayFromDate
class DateTimeFunctions:    @Description("day of the month of the given date")
    @ScalarFunction(value = "day", alias = "day_of_month")
    @SqlType(StandardTypes.BIGINT)
    public static long dayFromDate(@SqlType(StandardTypes.DATE) long date)
    {
        return DAY_OF_MONTH.get(DAYS.toMillis(date));
    }