Skip to content

Commit

Permalink
Support 'customPattern' as an alias of customDateTimePattern and cust…
Browse files Browse the repository at this point in the history
…omDatePattern

Closes #715
  • Loading branch information
joelittlejohn committed Mar 27, 2017
1 parent b5d3822 commit 1b6414b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ public void dateField(JFieldVar field, JsonNode node) {
String pattern = null;
if (node.has("customDatePattern")) {
pattern = node.get("customDatePattern").asText();
} else if (node.has("customPattern")) {
pattern = node.get("customPattern").asText();
} else if (getGenerationConfig().isFormatDates()) {
pattern = ISO_8601_DATE_FORMAT;
}
Expand All @@ -177,6 +179,8 @@ public void dateTimeField(JFieldVar field, JsonNode node) {
String pattern = null;
if (node.has("customDateTimePattern")) {
pattern = node.get("customDateTimePattern").asText();
} else if (node.has("customPattern")) {
pattern = node.get("customPattern").asText();
} else if (getGenerationConfig().isFormatDateTimes()) {
pattern = ISO_8601_DATETIME_FORMAT;
}
Expand Down

0 comments on commit 1b6414b

Please sign in to comment.