]> git.koha-community.org Git - koha.git/commit
Bug 19816: Implement dateonly for rfc3339 format
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 24 Jan 2019 17:29:09 +0000 (14:29 -0300)
committerroot <root@665746303f3b>
Mon, 4 Feb 2019 14:09:43 +0000 (14:09 +0000)
commitb2dce05ddff8a047e7770ea241b1edd9b798212e
tree8be989f158362deff589bc8f24adc6d7f025c8a9
parent7e69ab62a5ef3fbd350c6606d25b5ab6f6bc168e
Bug 19816: Implement dateonly for rfc3339 format

This patch implements the dateonly option for the rfc3339. This is
described in the OpenAPI 2.0 specification [1]. The required output
format is described on RFC 3339 [2], as 'full-date'.

[1] https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#dataTypeFormat
[2] https://tools.ietf.org/html/rfc3339#section-5.6

To test:
- Apply the regression tests patch
- Run:
 k$ prove t/DateUtils.t
=> FAIL: Tests fail because dateonly is not implemented
- Apply this patch
- Run:
 k$ prove t/DateUtils.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/DateUtils.pm