{"id":22062761,"url":"https://github.com/ryan-haskell/date-format","last_synced_at":"2025-12-11T20:53:06.034Z","repository":{"id":56575820,"uuid":"134187121","full_name":"ryan-haskell/date-format","owner":"ryan-haskell","description":"A reliable way to format dates and times in Elm.","archived":false,"fork":false,"pushed_at":"2024-03-12T23:17:43.000Z","size":77,"stargazers_count":51,"open_issues_count":21,"forks_count":27,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-27T09:29:30.770Z","etag":null,"topics":["date","elm","format","moment"],"latest_commit_sha":null,"homepage":"https://package.elm-lang.org/packages/ryan-haskell/date-format/latest","language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryan-haskell.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2018-05-20T21:11:21.000Z","updated_at":"2024-04-17T13:38:47.000Z","dependencies_parsed_at":"2024-03-18T05:03:23.074Z","dependency_job_id":"e1259640-3992-44ec-8f21-f873b7f345ff","html_url":"https://github.com/ryan-haskell/date-format","commit_stats":null,"previous_names":["ryan-haskell/date-format","ryannhg/date-format"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Fdate-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Fdate-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Fdate-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Fdate-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryan-haskell","download_url":"https://codeload.github.com/ryan-haskell/date-format/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227393711,"owners_count":17773332,"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","format","moment"],"created_at":"2024-11-30T18:26:49.106Z","updated_at":"2025-12-11T20:53:00.981Z","avatar_url":"https://github.com/ryan-haskell.png","language":"Elm","readme":"# date-format\n\u003e A reliable way to format dates and times with Elm.\n\n[![Build Status](https://travis-ci.org/ryan-haskell/date-format.svg?branch=master)](https://travis-ci.org/ryan-haskell/date-format)\n\n\n### Using the [elm package](http://package.elm-lang.org/packages/ryan-haskell/date-format/latest)\n\n```\nelm install ryan-haskell/date-format\n```\n\n\n### What is `date-format`?\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`date-format` has similar [formatting options](https://momentjs.com/docs/#/displaying/format/) as Moment, but it 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 DateFormat\nimport Time exposing (Posix, Zone, utc)\n\n\n\n-- Let's create a custom formatter we can use later:\n\n\nourFormatter : Zone -\u003e Posix -\u003e String\nourFormatter =\n    DateFormat.format\n        [ DateFormat.monthNameFull\n        , DateFormat.text \" \"\n        , DateFormat.dayOfMonthSuffix\n        , DateFormat.text \", \"\n        , DateFormat.yearNumber\n        ]\n\n\n\n-- With our formatter, we can format any date as a string!\n\n\nourTimezone : Zone\nourTimezone =\n    utc\n\n\n\n-- 2018-05-20T19:18:24.911Z\n\n\nourPosixTime : Posix\nourPosixTime =\n    Time.millisToPosix 1526843861289\n\n\nourPrettyDate : String\nourPrettyDate =\n    ourFormatter ourTimezone ourPosixTime\n\n```\n\nWould make `ourPrettyDate` return:\n\n```\n\"May 20th, 2018\" : String\n```\n\n### Want more examples?\n\nI've created a few more examples in the `examples/` folder for this repo.\n\nHere's how you can try them out:\n\n1. `git clone https://github.com/ryan-haskell/date-format`\n\n1. `cd date-format/examples`\n\n1. `elm reactor`\n\n1. Go to [http://localhost:8000](http://localhost:8000)\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryan-haskell%2Fdate-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryan-haskell%2Fdate-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryan-haskell%2Fdate-format/lists"}