{"id":28430967,"url":"https://github.com/elixir-cldr/cldr_calendars_persian","last_synced_at":"2025-07-04T17:31:02.672Z","repository":{"id":57499627,"uuid":"226805183","full_name":"elixir-cldr/cldr_calendars_persian","owner":"elixir-cldr","description":"Persian (solar hijri) localised calendar for Elixir and CLDR","archived":false,"fork":false,"pushed_at":"2025-03-19T00:40:12.000Z","size":309,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-05T14:39:41.472Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elixir-cldr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-12-09T06:55:44.000Z","updated_at":"2025-03-30T01:28:06.000Z","dependencies_parsed_at":"2024-07-06T03:59:05.487Z","dependency_job_id":null,"html_url":"https://github.com/elixir-cldr/cldr_calendars_persian","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"7416b40fec972f26bfa4a466041a5c173e4d4b01"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/elixir-cldr/cldr_calendars_persian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-cldr%2Fcldr_calendars_persian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-cldr%2Fcldr_calendars_persian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-cldr%2Fcldr_calendars_persian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-cldr%2Fcldr_calendars_persian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-cldr","download_url":"https://codeload.github.com/elixir-cldr/cldr_calendars_persian/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-cldr%2Fcldr_calendars_persian/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263587932,"owners_count":23484831,"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":[],"created_at":"2025-06-05T14:30:41.236Z","updated_at":"2025-07-04T17:31:02.667Z","avatar_url":"https://github.com/elixir-cldr.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Persian (Solar Hijri) Calendar\n\nThis library implements the Solar Hijri calendar that is used in Iran and Afghanistan.\n\nFrom [wikipedia](https://en.wikipedia.org/wiki/Solar_Hijri_calendar):\n\nThe Solar Hijri calendar (Persian: گاه‌شماری هجری خورشیدی‎, romanized: gāh-shomāri-ye hejri-ye khorshidi; Pashto: لمريز لېږدیز کلیز‎), also called the Solar Hejri calendar or Shamsi Hijri calendar, and abbreviated as SH, is the official calendar of Iran and Afghanistan. It begins on the March equinox (Nowruz) as determined by astronomical calculation for the Iran Standard Time meridian (52.5°E, UTC+03:30) and has years of 365 or 366 days.\n\nIts determination of the start of each year is astronomically accurate year-to-year as opposed to the more fixed Gregorian calendar or \"Common Era calendar\" which, averaged out, has the same year length, achieving the same accuracy (a more simply patterned calendar of 365 days for three consecutive years plus an extra day in the next year, save for exceptions to the latter in three out of every four centuries). The start of the year and its number of days remain fixed to one of the two equinoxes, the astronomically important days which have the same duration of day as night. It results in less variability of all celestial bodies when comparing a specific calendar date from one year to others.[2]\n\nEach of the twelve months corresponds with a zodiac sign. The first six months have 31 days, the next five have 30 days, and the last month has 29 days in usual years but 30 days in leap years. The New Year's Day always falls on the March equinox.\n\n## Usage\n\n[ex_cldr_calendars_persian](https://hex.pm/packages/ex_cldr_calenars_persian) conforms to both the `Calendar` and `Cldr.Calendar` behaviours and therefore the functions in the `Date`, `DateTime`, `NaiveDateTime`, `Time` and `Calendar` functions are supported.\n\nFor Elixir versions up to and including 1.9, a date can be created by:\n```elixir\niex\u003e {:ok, date} = Date.new(1354, 1, 1, Cldr.Calendar.Persian)\n{:ok, ~D[1354-01-01 Cldr.Calendar.Persian]}\n```\nFor Elixir version 1.10 and later `Sigil_D` supports user-defined calendars:\n```\niex\u003e ~D[1354-01-01 Cldr.Calendar.Persian]\n~D[1354-01-01 Cldr.Calendar.Persian]\n```\n\n## Localization\n\n`ex_cldr_calendars_persian` depends on [ex_cldr_calendars](https://hex.pm/packages/ex_cldr_calendars) which supports calendar localization. For full date and time formatting see [ex_cldr_dates_times](https://hex.pm/packages/ex_cldr_dates_times).\n\nBasic localization is executed by the `Cldr.Calendar.localize/3`. For example:\n\n```elixir\niex\u003e Cldr.Calendar.localize(date, :month, locale: \"en\")\n\"Farvardin\"\n\niex\u003e Cldr.Calendar.localize(date, :month, locale: \"fa\")\n\"فروردین\"\n\niex\u003e Cldr.Calendar.localize(date, :day_of_week, locale: \"fa\")\n\"جمعه\"\n\niex\u003e Cldr.Calendar.localize(date, :day_of_week, locale: \"en\")\n\"Fri\"\n```\n\n## Relationship to other libraries\n\nThis library is part of the [CLDR](https://cldr.unicode.org)-based libraries for Elixir including:\n\n* [ex_cldr](https://hex.pm/packages/ex_cldr)\n* [ex_cldr_numbers](https://hex.pm/packages/ex_cldr_numbers)\n* [ex_cldr_dates_times](https://hex.pm/packages/ex_cldr_dates_times)\n* [ex_cldr_units](https://hex.pm/packages/ex_cldr_units)\n* [ex_cldr_lists](https://hex.pm/packages/ex_cldr_lists)\n* [ex_cldr_messages](https://hex.pm/packages/ex_cldr_messages)\n* [ex_cldr_calendars](https://hex.pm/packages/ex_cldr_calendars)\n* [ex_cldr_currencies](https://hex.pm/packages/ex_cldr_currencies)\n\n## Installation\n\nThe package can be installed by adding `cldr_calendars_persian` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:ex_cldr_calendars_persian, \"~\u003e 1.0\"}\n  ]\nend\n```\nDocumentation can be found at [https://hexdocs.pm/ex_cldr_calendars_persian](https://hexdocs.pm/ex_cldr_calendars_persian).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-cldr%2Fcldr_calendars_persian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-cldr%2Fcldr_calendars_persian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-cldr%2Fcldr_calendars_persian/lists"}