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

Create checks, that the CII date format is verified #259

Closed
phax opened this issue Jan 13, 2021 · 3 comments
Closed

Create checks, that the CII date format is verified #259

phax opened this issue Jan 13, 2021 · 3 comments
Milestone

Comments

@phax
Copy link
Collaborator

phax commented Jan 13, 2021

Source: itplr-kosit/validator-configuration-xrechnung#56

Please check that the format attribute is only 102, 610 or 616

Check the 102 format like this:

  • Length must be 8
  • All chars must be numeric
  • Year must be > 0
  • Month must be >= 1 and <= 12
  • Day must be >= 1 and <= 31

A regular expression for this may look like this:

^[0-9][0-9][0-9][1-9](1[0-2]|0[1-9])(3[01]|2[0-9]1[0-9]|0[1-9])$
@oriol oriol added this to the v1.3.5 milestone Jan 20, 2021
@oriol
Copy link
Collaborator

oriol commented Mar 16, 2021

Applying regular expression (20\d{2})(\d{2})(\d{2}) to udt:DateTimeString[@Format = '102']

@phax
Copy link
Collaborator Author

phax commented Mar 16, 2021

I don't like the fix 20 in front. Wouldn't it be simpler (and less error prone) to use \d{8} instead?

@oriol
Copy link
Collaborator

oriol commented Mar 16, 2021

You are right.

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

No branches or pull requests

2 participants