intuit / intuit/common-xtext-expression-language

Validate format for dateFormat and addToDate method

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
easy enhancement
Dominant language
Java
Stars
11
Forks
6
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

`dateFormat` and `addToDate` function does not validate the dateFormat supplied as input to the function and accepts any String.

**Describe the solution you'd like**

Restrict access to only valid dateFormats supported by [SimpleDateFormat](https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html). The validation should be compile-time rather than at runtime.

**Additional context**

See [Xtext Validations](https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation) for pointers. You will either need to change the grammar or add custom validation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.