{"id":22982904,"url":"https://github.com/rozpo/pesel","last_synced_at":"2025-04-02T10:20:28.315Z","repository":{"id":190377552,"uuid":"682516096","full_name":"rozpo/pesel","owner":"rozpo","description":"Dart package for validation of the national identification number used in Poland.","archived":false,"fork":false,"pushed_at":"2023-08-24T17:18:24.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T01:28:12.139Z","etag":null,"topics":["dart","pesel","pubdev"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/pesel","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rozpo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-24T10:42:05.000Z","updated_at":"2024-11-03T09:56:41.000Z","dependencies_parsed_at":"2025-02-08T01:27:54.176Z","dependency_job_id":"f17575a6-ea93-4780-9018-ad4c14f6c80f","html_url":"https://github.com/rozpo/pesel","commit_stats":null,"previous_names":["rozpo/pesel"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozpo%2Fpesel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozpo%2Fpesel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozpo%2Fpesel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozpo%2Fpesel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rozpo","download_url":"https://codeload.github.com/rozpo/pesel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246794206,"owners_count":20834938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","pesel","pubdev"],"created_at":"2024-12-15T02:33:43.724Z","updated_at":"2025-04-02T10:20:28.287Z","avatar_url":"https://github.com/rozpo.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PESEL Library\n\n![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/rozpo/pesel/dart.yml)\n![Codecov](https://img.shields.io/codecov/c/github/rozpo/pesel)\n![GitHub release (with filter)](https://img.shields.io/github/v/release/rozpo/pesel)\n![GitHub](https://img.shields.io/github/license/rozpo/pesel)\n\nThe PESEL library is a Dart package that provides functionality to work with PESEL (Personal Identification Number) in Poland. PESEL is used to identify individuals and contains information about birthdate and sex.\n\nhttps://obywatel.gov.pl/pl/dokumenty-i-dane-osobowe/czym-jest-numer-pesel\n\n## Installation\n\nTo use this library in your Dart project, add the following dependency to your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  pesel: ^1.0.0\n```\n\nThen, run `dart pub get` to fetch the package.\n\n## Usage\n\n```dart\nimport 'package:pesel/pesel.dart';\n\nvoid main() {\n  // Create a Pesel instance\n  final peselString = \"22291028314\";\n  final pesel = Pesel(peselString);\n\n  // Print the PESEL number\n  print(pesel);\n\n  // Check if the PESEL is valid\n  if (pesel.isValid) {\n    print(\"This PESEL is valid.\");\n  } else {\n    print(\"This PESEL is not valid.\");\n  }\n\n  // Check if the PESEL belongs to a male or female\n  if (pesel.isMale) {\n    print(\"This PESEL belongs to a male.\");\n  } else if (pesel.isFemale) {\n    print(\"This PESEL belongs to a female.\");\n  }\n\n  // Print the sex of the individual\n  print(\"Sex: ${pesel.sex}\");\n\n  // Print the date of birth\n  print(\"Date of Birth: ${pesel.dateOfBirth}\");\n}\n```\n\n## API Reference\n\n### Class: Pesel\n\nRepresents a PESEL (Personal Identification Number) in Poland, used to identify individuals.\n\n#### Constructors\n\n- `Pesel(String pesel)`: Creates a Pesel instance from a valid PESEL string.\n\n#### Properties\n\n- `bool isMale`: Checks if the PESEL belongs to a male individual.\n- `bool isFemale`: Checks if the PESEL belongs to a female individual.\n- `bool isValid`: Checks if the PESEL is valid based on its checksum.\n- `DateTime dateOfBirth`: Retrieves the date of birth associated with the PESEL.\n- `Sex sex`: Determines the sex of the individual associated with the PESEL.\n\n### Enum: Sex\n\nRepresents the biological sex of an individual.\n\n- `male`: Represents the male sex.\n- `female`: Represents the female sex.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frozpo%2Fpesel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frozpo%2Fpesel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frozpo%2Fpesel/lists"}