Replies: 1 comment
-
|
Hi @delanym, thanks for asking. The date/time components still use There is no immediate plan to change those types because they are part of the public API and are used by many downstream projects. That said, converting to Field32A f = mt.getField32A();
// From the Calendar accessor
Calendar cal = f.getDateAsCalendar();
LocalDate date = (cal == null) ? null
: LocalDate.of(
cal.get(Calendar.YEAR),
cal.get(Calendar.MONTH) + 1,
cal.get(Calendar.DAY_OF_MONTH)
);
// Or directly from the raw component: yyMMdd for field 32A
LocalDate date2 = LocalDate.parse(
f.getComponent1(),
DateTimeFormatter.ofPattern("yyMMdd")
); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any plan to use the new Java Time API? I see Calendar is still used in Field32A for example.
Beta Was this translation helpful? Give feedback.
All reactions