{"id":20374770,"url":"https://github.com/kmedian/yearfrac","last_synced_at":"2025-08-21T02:09:46.228Z","repository":{"id":46112075,"uuid":"146980321","full_name":"kmedian/yearfrac","owner":"kmedian","description":"Difference between dates as a fraction of 1 year","archived":false,"fork":false,"pushed_at":"2023-05-09T08:55:04.000Z","size":56,"stargazers_count":5,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-18T08:59:09.526Z","etag":null,"topics":["date-calculation","day-count","day-count-method","icma","isda","pypi","year-difference"],"latest_commit_sha":null,"homepage":"","language":"Python","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/kmedian.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":".github/FUNDING.yml","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":{"github":["ulf1"]}},"created_at":"2018-09-01T08:07:30.000Z","updated_at":"2023-10-04T23:43:13.000Z","dependencies_parsed_at":"2024-11-15T05:16:26.611Z","dependency_job_id":null,"html_url":"https://github.com/kmedian/yearfrac","commit_stats":{"total_commits":43,"total_committers":5,"mean_commits":8.6,"dds":0.09302325581395354,"last_synced_commit":"b0144d0800351420070450f4aeb5fe65a40dbb11"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/kmedian/yearfrac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmedian%2Fyearfrac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmedian%2Fyearfrac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmedian%2Fyearfrac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmedian%2Fyearfrac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kmedian","download_url":"https://codeload.github.com/kmedian/yearfrac/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmedian%2Fyearfrac/sbom","scorecard":{"id":563978,"data":{"date":"2025-08-11","repo":{"name":"github.com/kmedian/yearfrac","commit":"877318c3d43387eb352f9c190f112f12836d3b88"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/syntax-and-unit-tests.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/kmedian/yearfrac/syntax-and-unit-tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/syntax-and-unit-tests.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/kmedian/yearfrac/syntax-and-unit-tests.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/syntax-and-unit-tests.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/syntax-and-unit-tests.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/syntax-and-unit-tests.yml:27","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/syntax-and-unit-tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":2,"reason":"Found 2/8 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-44cc-43rp-5947","Warn: Project is vulnerable to: PYSEC-2021-130 / GHSA-4952-p58q-6crx","Warn: Project is vulnerable to: GHSA-9q39-rmj3-p4r2","Warn: Project is vulnerable to: PYSEC-2020-73","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6","Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T14:26:21.891Z","repository_id":46112075,"created_at":"2025-08-20T14:26:21.891Z","updated_at":"2025-08-20T14:26:21.891Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271415496,"owners_count":24755639,"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-08-21T02:00:08.990Z","response_time":74,"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":["date-calculation","day-count","day-count-method","icma","isda","pypi","year-difference"],"created_at":"2024-11-15T01:26:49.924Z","updated_at":"2025-08-21T02:09:46.212Z","avatar_url":"https://github.com/kmedian.png","language":"Python","funding_links":["https://github.com/sponsors/ulf1"],"categories":[],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/yearfrac.svg)](https://badge.fury.io/py/yearfrac)\n[![yearfrac](https://snyk.io/advisor/python/yearfrac/badge.svg)](https://snyk.io/advisor/python/yearfrac)\n\n\n# yearfrac\n\n## Installation\nThe `yearfrac` [git repo](http://github.com/kmedian/yearfrac) is available as [PyPi package](https://pypi.org/project/yearfrac)\n\n```\npip install yearfrac\n```\n\n\n## Usage\nCheck the [examples](https://github.com/kmedian/yearfrac/tree/master/examples) folder for notebooks.\n\nFunctions\n\n* `isaleapyear` -- Check if a year is leap year\n* `eastersunday` -- Determine day and month of an Easter Sunday for a given year\n* `jd_to_date` and `date_to_jd` -- Julian Day number conversion\n* `act_afb` -- Actual/Actual AFB\n* `act_isda` -- Actual/Actual ISDA\n* `d30360e` -- 30E/360 ISDA daycount method\n* `d30365` -- 30/365 daycount method\n* `yearfrac` -- Wrapper for all daycount methods\n\n\n## Appendix\n\n### Install a virtual environment\n\n```\npython3.7 -m venv .venv\nsource .venv/bin/activate\npip3 install --upgrade pip\npip3 install -r requirements.txt\npip3 install -r requirements-dev.txt\npip3 install -r requirements-demo.txt\n```\n\n(If your git repo is stored in a folder with whitespaces, then don't use the subfolder `.venv`. Use an absolute path without whitespaces.)\n\n### Python Commands\n* Check syntax: `flake8 --ignore=F401 --exclude=$(grep -v '^#' .gitignore | xargs | sed -e 's/ /,/g')`\n* Run Unit Tests: `python -W ignore -m unittest discover`\n* Remove `.pyc` files: `find . -type f -name \"*.pyc\" | xargs rm`\n* Remove `__pycache__` folders: `find . -type d -name \"__pycache__\" | xargs rm -rf`\n\nPublish\n\n```sh\n# pandoc README.md --from markdown --to rst -s -o README.rst  # RST file is too much trouble\npython setup.py sdist \ntwine upload -r pypi dist/*\n```\n\n### Support\nPlease [open an issue](https://github.com/kmedian/yearfrac/issues/new) for support.\n\n\n### Contributors\n* Adam Groszer [@agroszer](https://github.com/agroszer)\n* Emilio Basualdo [@emiliobasualdo](https://github.com/emiliobasualdo)\n* Ivan Nesic [@fatkaratekid](https://github.com/fatkaratekid)\n* Vinay Gupta [@vinschess](https://github.com/vinschess)\n* Ulf Hamster [@ulf1](https://github.com/ulf1)\n\nPlease contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/kmedian/yearfrac/compare/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmedian%2Fyearfrac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkmedian%2Fyearfrac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmedian%2Fyearfrac/lists"}