-
Notifications
You must be signed in to change notification settings - Fork 119
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
Badly specified dates should produce an error rather than a warning #375
Comments
Some investigation on this issue: The proposed resolution would be to treat |
Tried on the provided sample:
|
Cicero part of this fixed in PR #379 I can't speak to the Clause issues that may or may not need additional fixes. |
Describe the bug
If a date is specified in the sample.txt file in European format (DD/MM/YYYY) then a warning is produced.
To Reproduce
Run 'cicero execute' on the attached cta file.
Expected behavior
An error should be produced.
Screenshots
This is the warning produced:
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: Invalid date, _f: undefined, _strict: undefined, _locale: [object Object]
Error
at Function.createFromInputFallback (/Users/adrianfletcher/.nvm/versions/node/v11.10.0/lib/node_modules/@accordproject/cicero-cli/node_modules/moment-mini/moment.min.js:1:3430)
at Yt (/Users/adrianfletcher/.nvm/versions/node/v11.10.0/lib/node_modules/@accordproject/cicero-cli/node_modules/moment-mini/moment.min.js:1:21380)
at Ot (/Users/adrianfletcher/.nvm/versions/node/v11.10.0/lib/node_modules/@accordproject/cicero-cli/node_modules/moment-mini/moment.min.js:1:22091)
at Tt (/Users/adrianfletcher/.nvm/versions/node/v11.10.0/lib/node_modules/@accordproject/cicero-cli/node_modules/moment-mini/moment.min.js:1:22173)
at new c.parseZone (/Users/adrianfletcher/.nvm/versions/node/v11.10.0/lib/node_modules/@accordproject/cicero-cli/node_modules/moment-mini/moment.min.js:1:50491)
at JSONPopulator.convertToObject (/Users/adrianfletcher/.nvm/versions/node/v11.10.0/lib/node_modules/@accordproject/cicero-cli/node_modules/composer-concerto/lib/serializer/jsonpopulator.js:219:26)
at JSONPopulator.convertItem (/Users/adrianfletcher/.nvm/versions/node/v11.10.0/lib/node_modules/@accordproject/cicero-cli/node_modules/composer-concerto/lib/serializer/jsonpopulator.js:198:27)
at JSONPopulator.visitField (/Users/adrianfletcher/.nvm/versions/node/v11.10.0/lib/node_modules/@accordproject/cicero-cli/node_modules/composer-concerto/lib/serializer/jsonpopulator.js:150:27)
at JSONPopulator.visit (/Users/adrianfletcher/.nvm/versions/node/v11.10.0/lib/node_modules/@accordproject/cicero-cli/node_modules/composer-concerto/lib/serializer/jsonpopulator.js:101:25)
at Field.accept (/Users/adrianfletcher/.nvm/versions/node/v11.10.0/lib/node_modules/@accordproject/cicero-cli/node_modules/composer-concerto/lib/introspect/decorated.js:65:24)
Additional context
If this warning is ignored then confusing errors occur when the template is uploaded to Clause.
credit-insurance@0.1.3.cta.zip
The text was updated successfully, but these errors were encountered: