iban-ex/lib/iban_ex/country/dk.ex

25 lines
555 B
Elixir
Raw Normal View History

2024-03-05 11:02:58 +00:00
defmodule IbanEx.Country.DK do
@moduledoc """
Denmark IBAN parsing rules
## Examples
2024-05-14 23:15:55 +00:00
```elixir
iex> %IbanEx.Iban{
...> country_code: "DK",
...> check_digits: "50",
...> bank_code: "0040",
...> branch_code: nil,
...> national_check: nil,
...> account_number: "0440116243"
...> }
...> |> IbanEx.Country.DK.to_string()
"DK 50 0040 0440116243"
```
2024-03-05 11:02:58 +00:00
"""
@size 18
@rule ~r/^(?<bank_code>[0-9]{4})(?<account_number>[0-9]{10})$/i
use IbanEx.Country.Template
2024-03-05 11:02:58 +00:00
end