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