{"id":15038416,"url":"https://github.com/halilozel1903/swiftleapyear","last_synced_at":"2026-02-17T18:33:52.942Z","repository":{"id":237452986,"uuid":"631019765","full_name":"halilozel1903/SwiftLeapYear","owner":"halilozel1903","description":"Code in Swift Programming Language that determines whether a given year is a leap year or not. ⚠️ 💥 ✅","archived":false,"fork":false,"pushed_at":"2023-04-22T21:36:42.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T23:13:26.846Z","etag":null,"topics":["ios","ios-app","ios-application","ios-development","ios-swift","swift","swift-app","swift-application","swift-lang","swift-language","swift-playground","swift-playground-app","swift-playground-labs","swift-playgrounds","swift-tutorial","swift-tutorials"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/halilozel1903.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-21T18:02:34.000Z","updated_at":"2023-04-21T18:34:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"0498a10f-c6a2-4f3e-ac23-d79577b6848e","html_url":"https://github.com/halilozel1903/SwiftLeapYear","commit_stats":null,"previous_names":["halilozel1903/swiftleapyear"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/halilozel1903/SwiftLeapYear","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halilozel1903%2FSwiftLeapYear","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halilozel1903%2FSwiftLeapYear/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halilozel1903%2FSwiftLeapYear/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halilozel1903%2FSwiftLeapYear/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halilozel1903","download_url":"https://codeload.github.com/halilozel1903/SwiftLeapYear/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halilozel1903%2FSwiftLeapYear/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001135,"owners_count":26083022,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ios","ios-app","ios-application","ios-development","ios-swift","swift","swift-app","swift-application","swift-lang","swift-language","swift-playground","swift-playground-app","swift-playground-labs","swift-playgrounds","swift-tutorial","swift-tutorials"],"created_at":"2024-09-24T20:38:23.136Z","updated_at":"2025-10-09T09:32:16.512Z","avatar_url":"https://github.com/halilozel1903.png","language":"Swift","funding_links":["https://www.buymeacoffee.com/halilozel1903"],"categories":[],"sub_categories":[],"readme":"# Swift Leap Year 📆 💀 👀\n\n![Swift Leap Year](https://www.fullsail.edu/assets/ext/share/mobile-development-degree-an-early-adopter-of-apples-swift-programming-language-hero.jpg)\n\nA **Leap Year** is a year that is evenly divisible by 4, except for years that are divisible by 100 but not by 400. This means that the year 2000 was a leap year, but 1900 was not.\n\nHere is a program in `Swift` that determines whether a given year is a leap year or not:\n\n```swift\nfunc isLeapYear(_ year: Int) -\u003e Bool {\n    if year % 4 == 0 {\n        if year % 100 == 0 {\n            if year % 400 == 0 {\n                return true\n            } else {\n                return false\n            }\n        } else {\n            return true\n        }\n    } else {\n        return false\n    }\n}\n\n// Example usage\nlet year = 2024\nif isLeapYear(year) {\n    print(\"\\(year) is a leap year\")\n} else {\n    print(\"\\(year) is not a leap year\")\n}\n\n```\nThe `isLeapYear` function takes an integer as input and returns `true` if it is a leap year, or `false` otherwise. The algorithm checks if the year is divisible by 4, then checks if it is divisible by 100, and finally checks if it is divisible by 400. If it is divisible by 4 and not by 100, or if it is divisible by 400, then it is a leap year. Otherwise, it is not a leap year.\n\nIn the example usage, the variable `year` is set to 2024, and the `isLeapYear` function is called with year as the argument. If the function returns `true`, it prints a message saying that `year` is a leap year. If the function returns `false`, it prints a message saying that year is not a leap year.\n\n```swift\n2024 is a leap year\n```\n## Donation 💸\n\nIf this project help 💁 you, Can you give me a cup of coffee? ☕\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/halilozel1903)\n\n# License ℹ️\n```\nMIT License\n\nCopyright (c) 2023 Halil OZEL\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalilozel1903%2Fswiftleapyear","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalilozel1903%2Fswiftleapyear","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalilozel1903%2Fswiftleapyear/lists"}