Menu

#1 [fitlibraryweb] [CreateDate] format ISO8601 now supported

open
nobody
None
5
2012-10-05
2012-10-05
ECosiCresci
No

- I'm using fitlibraryweb CreateDate fixture for testing services returning dates in ISO8601 format (http://en.wikipedia.org/wiki/ISO8601). Current implementation of the fixture is using the DateTimeFormat joda-time class, while in order to format a date with ISO8601 the ISODateTimeFormat class should be used.
- The main reason I found for applying the patch is the timezone: ISO format uses the form '±HH:mm' for non-zero and 'Z' for ±00:00, no date pattern can represent it. In fact, using timezone pattern Z, timezone is formatted as '±HHmm' for non-zero and as 'Z' for ±00:00; using timezone pattern ZZ, timezone is formatted as '±HH:mm' for both non-zero and ±00:00.

- A part from creating dates in ISO8601, I also needed to set a specific hour and/or minute. For this reason, the patch also adds support for setting the year, month, day, hour, minute, second and/or millis of the date.

Attached are the CreateDate class, the junit class and the fitnesse documentation page updated.
Feel free to use and refactor the code.
I do need this functionality for testing my services so that it would be great if it will be included in the next release :-)

Related

fitlibraryweb: fitlibraryweb

Discussion

  • ECosiCresci

    ECosiCresci - 2012-10-05

    The CreateDate class, the junit class and the fitnesse documentation page updated.

     
  • Darren Rowley

    Darren Rowley - 2012-10-13

    Thanks for this, I will take a look at it and get it integrated into the source code for the next FitLbrary release.

     

Log in to post a comment.