1. Domino REST
  2. Rest clients
  3. Date format

Date format

If we have a @QueryParam, @PathParam or @HeaderParam and the type of parameter is Date then we can use @DateFormat annotation provided by domino-rest to specify the pattern to format the value of the parameter, if @DateFormat is not specified we String.valueOf will be used.

			    @GET
    @Path("someService/{starting-date}")
    String getByDate(@QueryParam("birth-date") @DateFormat("dd-MM-yyyy") Date birthDate,
                     @PathParam("starting-date") @DateFormat("d-M-yy") Date startingDate);
		

We are a group of passionate people who love what we do

Donate & Support Us