mykad 0.0.1 copy "mykad: ^0.0.1" to clipboard
mykad: ^0.0.1 copied to clipboard

Parses Malaysian Identification Card numbers (MyKad)

example/mykad_example.dart

// ignore_for_file: avoid_print

import 'package:mykad/mykad.dart';

void main() {
  final mykad = MyKad.parse('980927120123', referenceDate: DateTime(2023));
  print(mykad.formattedNric); // 980927-12-0123
  print(mykad.gender); // Gender.male
  print(mykad.birthdate); // DateTime(1998, 09, 27)
  print(mykad.age); // 25
}
0
likes
150
points
9
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Parses Malaysian Identification Card numbers (MyKad)

License

MIT (license)

More

Packages that depend on mykad