For one of the projects, I was given a millisecond from another system. I need to convert to "yyyy-DDDT:HH:mm:ssZ"
The trick is to display it in leap-second.
Since Java libraries does not have leap-second, I decided to use Time4J's Moment class.
But Moment's toString() is printing yyyy-MM-ddTHH:mm:ss.
Is it possible to get day of year in Moment class?
Is there any example to create a custom formatter. I tried a few including ChronoFormatter. but could not get the desired results.
One nasty workaround is to use Calendar for Date part and Moment for time part.
But it is tedious, and will be difficult when parsing back from String.