Skip to content

dasmig-core 1.4.0

Latest

Choose a tag to compare

@dasmig dasmig released this 30 Oct 22:05
· 2 commits to main since this release
83e103f

Four new headers for the identifier, money and time-zone libraries. Nothing existing changes output. Libraries need DASMIG_CORE_REQUIRE(1, 4) to use them.

  • Check digits (check_digits.hpp): Luhn, ISO 7064 MOD 97-10 with IBAN, MOD 11-2, MOD 11,10, GTIN, ICAO 9303 and Verhoeff, plus weighted_sum for national mod-11 rules. All constexpr, with errors that give the position.
  • Patterns (pattern.hpp): an identifier pattern language with parse, draw (part of the output contract), matches in polynomial time, and count.
  • Money (money.hpp): integer minor units with an ISO 4217 code, rounding that is the same on every platform, exact decimal text, and {"amount":...,"currency":...} JSON.
  • Time-zone rules (tz.hpp): periods plus a POSIX TZ rule. Gives offsets and local time to UTC and back, including skipped and repeated local times, and does not depend on the operating system's time-zone database.

See the usage guide for the exact algorithms.