{"id":22062742,"url":"https://github.com/ryan-haskell/elm-moment","last_synced_at":"2026-05-31T02:31:37.535Z","repository":{"id":62419506,"uuid":"122022907","full_name":"ryan-haskell/elm-moment","owner":"ryan-haskell","description":"A reliable way to format dates with elm.","archived":false,"fork":false,"pushed_at":"2018-02-21T16:20:57.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T17:48:58.656Z","etag":null,"topics":["date","elm","formatting","moment"],"latest_commit_sha":null,"homepage":"http://package.elm-lang.org/packages/ryannhg/elm-moment/latest","language":"Elm","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/ryan-haskell.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}},"created_at":"2018-02-19T05:30:56.000Z","updated_at":"2020-06-01T19:08:27.000Z","dependencies_parsed_at":"2022-11-01T16:48:58.919Z","dependency_job_id":null,"html_url":"https://github.com/ryan-haskell/elm-moment","commit_stats":null,"previous_names":["ryan-haskell/elm-moment","ryannhg/elm-moment"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-moment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-moment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-moment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-moment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryan-haskell","download_url":"https://codeload.github.com/ryan-haskell/elm-moment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245144021,"owners_count":20568049,"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":["date","elm","formatting","moment"],"created_at":"2024-11-30T18:26:45.750Z","updated_at":"2025-10-23T19:43:32.763Z","avatar_url":"https://github.com/ryan-haskell.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elm-moment\n\u003e A reliable way to format dates with elm.\n\n# This project has moved!\n\nAnd now it's [over here](https://github.com/RyanNHG/elm-date-format).\n\nFollowing Elm's literal name policy, `elm-date-format` is probably more useful for discoverability.\n\n---\n\n### Using the [elm package](http://package.elm-lang.org/packages/ryannhg/elm-moment/latest)\n\n```\nelm package install ryannhg/elm-moment\n```\n\n\n### What is `elm-moment`?\n\nIf you're coming from Javascript, you might have heard of [MomentJS](https://momentjs.com).\n\nMomentJS is a great library for formatting dates!\n\n`elm-moment` has the same [formatting options](https://momentjs.com/docs/#/displaying/format/) as Moment, but uses Elm's awesome type system to provide human readable names, and catch typos for you at compile time!\n\nNo need to remember the difference between `mm` and `MM` and `M`!\n\n\n### A quick example\n\n```elm\nimport Date\nimport Moment\n\n\n-- Create a custom formatter\n\nyourFormatter : Date -\u003e String\nyourFormatter =\n    Moment.format\n        [ Moment.MonthNameFull\n        , Moment.Text \" \"\n        , Moment.DayOfMonthSuffix\n        , Moment.Text \", \"\n        , Moment.YearNumber\n        ]\n\n\n-- Using your formatter, format your date as a string!\n\nyourPrettyDate : String\nyourPrettyDate =\n    case Date.fromString \"2018-02-05T00:00:00.000Z\" of\n        Ok date -\u003e\n            yourFormatter date\n\n        Err -\u003e\n            \"This shouldn't happen...\"\n\n```\n\nWould make `yourPrettyDate` return:\n\n```\n\"February 5th, 2018\" : String\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryan-haskell%2Felm-moment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryan-haskell%2Felm-moment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryan-haskell%2Felm-moment/lists"}