{"id":13718850,"url":"https://github.com/personnummer/swift","last_synced_at":"2025-06-10T09:38:13.352Z","repository":{"id":28191683,"uuid":"116646504","full_name":"personnummer/swift","owner":"personnummer","description":"Validate Swedish personal identity numbers","archived":false,"fork":false,"pushed_at":"2024-10-23T19:12:20.000Z","size":53,"stargazers_count":4,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-05T16:14:01.657Z","etag":null,"topics":["hacktoberfest","personal-identity-number","personnummer","social-security-number","swift","validation"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/personnummer.png","metadata":{"files":{"readme":"README.md","changelog":null,"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},"funding":{"open_collective":"sweidproject"}},"created_at":"2018-01-08T07:52:35.000Z","updated_at":"2024-05-20T20:58:48.000Z","dependencies_parsed_at":"2024-01-06T00:06:31.825Z","dependency_job_id":"9686ef9e-f57f-4ab2-90c3-a0c5fbd96895","html_url":"https://github.com/personnummer/swift","commit_stats":{"total_commits":33,"total_committers":6,"mean_commits":5.5,"dds":0.5757575757575757,"last_synced_commit":"c765deaad98d56af49b3152c12b56725303bf437"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personnummer%2Fswift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personnummer%2Fswift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personnummer%2Fswift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personnummer%2Fswift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/personnummer","download_url":"https://codeload.github.com/personnummer/swift/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personnummer%2Fswift/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258963931,"owners_count":22784892,"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":["hacktoberfest","personal-identity-number","personnummer","social-security-number","swift","validation"],"created_at":"2024-08-03T01:00:38.681Z","updated_at":"2025-06-10T09:38:13.331Z","avatar_url":"https://github.com/personnummer.png","language":"Swift","funding_links":["https://opencollective.com/sweidproject"],"categories":["People"],"sub_categories":[],"readme":"# Personnummer [![Build Status](https://github.com/personnummer/swift/workflows/build/badge.svg)](https://github.com/personnummer/swift/actions)\n\nSmall library to validate and format swedish personal identity numbers called \"Personnummer\".\n\n## Installation\n\n### Cocoapods\n\n```ruby\npod 'Personnummer', '~\u003e 1.0.0'\n```\n\n### Swift Package Manager\n\n```swift\n.package(url: \"https://github.com/personnummer/swift.git\", from: \"1.0.2\")\n```\n\n## Usage\n\n```swift\n// Validate\nif !Personnummer.isValid(personnummerString) {\n    fatalError(\"Personnummer \\(personnummerString) was invalid\")\n}\n\n// Validate and format\nif let formattedPersonnummer = Personnummer.format(personnummerString) {\n    print(formattedPersonnummer)\n}\n\n// Get components of valid personnummer such as year etc and format\nguard let personnummer = Personnummer(personnummer: personnummerString) {\n    fatalError(\"Personnummer \\(personnummerString) was invalid\")\n}\n\nprint(personnummer.century)\nprint(personnummer.year)\nprint(personnummer.month)\nprint(personnummer.day)\nprint(personnummer.separator)\nprint(personnummer.fourLast)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpersonnummer%2Fswift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpersonnummer%2Fswift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpersonnummer%2Fswift/lists"}