Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support customDatePattern and customDateTimePattern as global config options #716

Closed
joelittlejohn opened this issue Mar 27, 2017 · 4 comments
Milestone

Comments

@joelittlejohn
Copy link
Owner

We can currently turn on default formatting with formatDates/formatDateTimes and also customize the pattern by adding customPattern to an individual field inside the schema. It would be good to be able to set a custom pattern globally (via a config option).

@joelittlejohn joelittlejohn added this to the 0.4.33 milestone Mar 27, 2017
@joelittlejohn
Copy link
Owner Author

This will also satisfy requests like #698

@sbyrx
Copy link
Contributor

sbyrx commented May 25, 2017

@joelittlejohn Is there a reason why customTimePattern isn't supported?

I'm using <timeType>java.time.LocalTime</timeType>, and would like to be able to specify a pattern and have my LocalTime fields be annotated with @JsonFormat.

I noticed that Jackson2Annotator only annotates date and date-time.

@joelittlejohn
Copy link
Owner Author

@sbyron15 I don't see any reason that we shouldn't fix that for you. I'll take a look.

@sbyrx
Copy link
Contributor

sbyrx commented Jun 4, 2017

@joelittlejohn I went ahead and added support myself. Please see #740

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants