I need to parse ISO 8601 Week dates into a format that Joda-Time can hopefully work with (eg. use for calculating the days in that week, etc.)
I've looked around a bit, but there doesn't seem to be any clear docs on how to do this.
A full DateTime
instance isn't right, since I don't have an Instant in time, I only have a Partial
. I can't seem to find any way to parse things into a Partial
, however.
Do I need to write my own parse()
method that can give me back a partial? There seem to be a couple of built-in parse methods that do this, but they all seem very specific and don't take a general format object.
Specifically, I have ISO 8601 Week dates in the following forms:
1998-W12
2005W23
What I need to do with these (ultimately) is take the week, and then convert that into a collection of the days in a given week (LocalDate
JodaTime
objects specifically). eg.
2013-W52 =>
2013-12-31
2014-01-01
2014-01-02
2014-01-03
2014-01-04
2014-01-05
2014-01-06