private static int[] translateToArray(String arg, String[] source)
    {
        List<Integer> array = new ArrayList<Integer>();
        StringTokenizer st = new StringTokenizer(arg,",");
        while (st.hasMoreTokens())
        {
            String dayOfWeek = st.nextToken().toLowerCase();
            for (int i=0;i<source.length;i++)
            {
                if (dayOfWeek.startsWith(source[i]))
                {
                    array.add(i);
                    break;
                }
            }
        }
        int[] ret = new int[array.size()];
        int j=0;
        for (Integer i:array)
        {
            ret[j++]=i;
        }
        if (j==0)
            throw new ValidationException("Failed to validate: "+arg);
        return ret;
    }