FORGE-1954: Add command to show the current date

This PR implements the *date* command that shows the current date as described in issue https://issues.jboss.org/browse/FORGE-1954

The user can specify a pattern to format the date.
AH. Okay. Yes that's fine :)


On Tue, Aug 5, 2014 at 4:34 PM, George Gastaldi <notifications@github.com>
wrote:

> In
> shell/impl/src/main/java/org/jboss/forge/addon/shell/command/DateCommand.java:
>
> > +
> > +/**
> > + *
> > + * @author <a href="mailto:md.benhassine@gmail.com">Mahmoud Ben Hassine</a>
> > + */
> > +public class DateCommand
> > +{
> > +
> > +   /**
> > +    * The date pattern.
> > +    */
> > +   private SimpleDateFormat dateFormat = new SimpleDateFormat();
> > +
> > +   @Command(value = "date", help = "print current date", enabled = NonGUIEnabledPredicate.class)
> > +   public Result execute(
> > +            @Option(value = "pattern", description = "The date pattern") final String pattern,
>
> It doesn't fail when a pattern is not supplied, it just fails if the
> pattern is incorrect, which is right afaik
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/forge/core/pull/491/files#r15839771>.
>



-- 
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."