code: private DateFormat parseFormatter(Context context, Arguments args)
      {
          final String format = args.get(FORMAT_PARAM_NAME);
          final Locale locale = context.get(LOCALE);
          if (format != null)
          {
              return new SimpleDateFormat(format, locale);
          }
  
          final int defaultFormatStyle = parseDateFormatStyle(args);
          final int dateFormatStyle = parseDateFormatStyle(args.get(DATE_PARAM_NAME), defaultFormatStyle);
          final int timeFormatStyle = parseDateFormatStyle(args.get(TIME_PARAM_NAME), defaultFormatStyle);
  
          if (Mode.DATE_TIME.equals(mode))
          {
              return DateFormat.getDateTimeInstance(dateFormatStyle, timeFormatStyle, locale);
          }
          else if (Mode.DATE.equals(mode))
          {
              return DateFormat.getDateInstance(dateFormatStyle, locale);
          }
          else if (Mode.TIME.equals(mode))
          {
              return DateFormat.getTimeInstance(timeFormatStyle, locale);
          }
          return DateFormat.getInstance();
      }
docs: Parses the {@link DateFormat} to use from the context arguments.
  
  @param context The context.
  @param args The arguments of the macro.
  
  @return the {@link DateFormat}.