Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Parsing DateTimes #39

Closed
PendelinP opened this issue Jun 19, 2019 · 4 comments
Closed

Parsing DateTimes #39

PendelinP opened this issue Jun 19, 2019 · 4 comments

Comments

@PendelinP
Copy link

It would be great to have a helper method to parse a DateTime value field in the following format "YYYY[MM[DD[HH[MM[SS[.S[S[S[S]]]]]]]]][+/-ZZZZ]".

See documentation: http://www.hl7.eu/refactored/dtDTM.html

@jaime-olivares
Copy link

Hi @PendelinP,
I understand your requirement, but the proposed PR doesn't seem to cover many cases, like these:

  • Date with decimal point
  • Date with intermediate digits of sub-seconds (different than 2 or 5)
  • Date with time-zone sign and digits
  • Combinations sub-seconds and time-zone digits

I will use another approach using regex and publish soon.

@Aaron-P
Copy link

Aaron-P commented Jun 19, 2019

I've done something sort of similar if it would be helpful.

DTM.txt

@jaime-olivares
Copy link

Already implemented a new method and added a big bunch of unit tests. There is a second method that returns also time-zone offset.

See nuget package 2.14

@PendelinP
Copy link
Author

Awesome! Thanks a lot ;)

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

No branches or pull requests

3 participants