Skip to content

[Feature] OBO: Let date be more diverse #23

@omaus

Description

@omaus

Is your feature request related to a problem?

Atm., date header tag must be in format "dd:MM:yyyy HH:mm", sticking a 100 % to the 1.4 flat file format. A lot of people actually use different formats for this, but the current reader does not parse this.

Describe the solution you would like!

It would be nice to also incorporate more formats:

  • "dd.MM.yyyy HH:mm"
  • "dd_MM_yyyy HH_mm"
  • "yyyy.MM.dd HH:mm"
  • "yyyy:MM:dd HH:mm"
  • "yyyy_MM_dd HH_mm"
  • all of the above + the original but without the daytime (e.g. "dd:MM:yyyy" instead of "dd:MM:yyyy HH:mm") which should be parsed to the corresponding System.DateTime with 12 AM o'clock (0:00)

Additional context!

Ignore the US way where month and day are interchanged. This just leads to a lot more difficult parsing and is ambiguous when day <13.

let rxDate = createRegex RegexOptions.None @"date\s*:\s*(?<date>\d{2}:\d{2}:\d{4} \d{2}:\d{2})"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions