{"id":19772969,"url":"https://github.com/Kira-NT/dotnet-format","last_synced_at":"2025-04-30T18:31:21.357Z","repository":{"id":57215512,"uuid":"316262517","full_name":"Kir-Antipov/dotnet-format","owner":"Kir-Antipov","description":"📝 Pretty accurate port of awesome .NET formatting operations for JS environment","archived":false,"fork":false,"pushed_at":"2020-11-26T18:55:20.000Z","size":72,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T21:06:10.670Z","etag":null,"topics":["date","dotnet","format","formats","formatting","js","module","number"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Kir-Antipov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-26T14:58:53.000Z","updated_at":"2023-10-01T01:03:44.000Z","dependencies_parsed_at":"2022-08-26T13:31:37.132Z","dependency_job_id":null,"html_url":"https://github.com/Kir-Antipov/dotnet-format","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kir-Antipov%2Fdotnet-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kir-Antipov%2Fdotnet-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kir-Antipov%2Fdotnet-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kir-Antipov%2Fdotnet-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kir-Antipov","download_url":"https://codeload.github.com/Kir-Antipov/dotnet-format/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224219648,"owners_count":17275477,"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","dotnet","format","formats","formatting","js","module","number"],"created_at":"2024-11-12T05:08:16.033Z","updated_at":"2025-04-30T18:31:16.040Z","avatar_url":"https://github.com/Kir-Antipov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotnet-format\n\n [![npm: dotnet-format][1]][2]\n [![License][3]][4]\n\nIt's 2020, and we still have no built-in tools to convert a date, number, or any other entity into a string using a custom format. Since I often write .NET programs, it looks like wildness to me, so I decided to port awesome .NET formatting operations for JS environment.\n\n## Table of Contents\n\n1. [Installation](#installation)\n2. [Date formatting operations](#date-formatting-operations)\n    1. [Examples](#date-examples)\n    2. [Standard date and time format strings](#date-standard-formats)\n    3. [Custom date and time format strings](#date-custom-formats)\n\n## Installation\n\n```\nnpm i dotnet-format\n```\n\n## Date formatting operations\n\n\u003ch3 id=\"date-examples\"\u003eExamples\u003c/h3\u003e\n\nThere're 3 ways to format date with this package.\n\n1) Import `formatDate(date: Date, format: string, culture?: string)` function from the main module:\n\n```js\nimport { formatDate } from \"dotnet-format\";\n\nlet date = new Date(0);\n\nconsole.log(formatDate(date, \"dd MM yyyy\")); // 01 01 1970\nconsole.log(formatDate(date, \"d MMM yyyy\")); // 1 Jan 1970\nconsole.log(formatDate(date, \"d MMM yyyy\", \"fr\")); // 1 janv. 1970\nconsole.log(formatDate(date, \"dd/MM/yyyy HH:mm\")); // 01/01/1970 00:00\nconsole.log(formatDate(date, \"U\")); // Thursday, January 01, 1970, 12:00:00 AM\n```\n\n2) Extend date protototype with `format(format: string, culture?: string)` function:\n```js\nimport * from \"dotnet-format/extensions/date/format\";\n\nlet date = new Date(0);\n\nconsole.log(date.format(\"dd MM yyyy\")); // 01 01 1970\nconsole.log(date.format(\"d MMM yyyy\")); // 1 Jan 1970\nconsole.log(date.format(\"d MMM yyyy\", \"fr\")); // 1 janv. 1970\nconsole.log(date.format(\"dd/MM/yyyy HH:mm\")); // 01/01/1970 00:00\nconsole.log(date.format(\"U\")); // Thursday, January 01, 1970, 12:00:00 AM\n```\n\n3) Extend date protototype with `toString(format?: string, culture?: string)` function:\n```js\nimport * from \"dotnet-format/extensions/date/toString\";\n\nlet date = new Date(0);\n\nconsole.log(date.toString(\"dd MM yyyy\")); // 01 01 1970\nconsole.log(date.toString(\"d MMM yyyy\")); // 1 Jan 1970\nconsole.log(date.toString(\"d MMM yyyy\", \"fr\")); // 1 janv. 1970\nconsole.log(date.toString(\"dd/MM/yyyy HH:mm\")); // 01/01/1970 00:00\nconsole.log(date.toString(\"U\")); // Thursday, January 01, 1970, 12:00:00 AM\n```\n\n\u003ch3 id=\"date-standard-formats\"\u003eStandard date and time format strings\u003c/h3\u003e\n\nA standard date and time format string uses a single character as the format specifier to define the text representation of a [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) value. Any date and time format string that contains more than one character, including white space, is interpreted as a [custom date and time format string](#date-custom-formats).\n\nThe following table describes the standard date and time format specifiers:\n\n| Format specifier | Description | Examples |\n| ---------------- | ----------- | -------- |\n| \"d\"      | Short date pattern. | 2009-06-15T13:45:30 -\u003e 6/15/2009 (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 15/06/2009 (fr-FR)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 2009/06/15 (ja-JP) |\n| \"D\"      | Long date pattern. | 2009-06-15T13:45:30 -\u003e Monday, June 15, 2009 (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 15 июня 2009 г. (ru-RU)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e Montag, 15. Juni 2009 (de-DE) |\n| \"f\"      | Full date/time pattern (short time). | 2009-06-15T13:45:30 -\u003e Monday, June 15, 2009 1:45 PM (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e den 15 juni 2009 13:45 (sv-SE)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e Δευτέρα, 15 Ιουνίου 2009 1:45 μμ (el-GR) |\n| \"F\"      | Full date/time pattern (long time). | 2009-06-15T13:45:30 -\u003e Monday, June 15, 2009 1:45:30 PM (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e den 15 juni 2009 13:45:30 (sv-SE)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e Δευτέρα, 15 Ιουνίου 2009 1:45:30 μμ (el-GR) |\n| \"g\"      | General date/time pattern (short time). | 2009-06-15T13:45:30 -\u003e 6/15/2009 1:45 PM (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 15/06/2009 13:45 (es-ES)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 2009/6/15 13:45 (zh-CN) |\n| \"G\"      | General date/time pattern (long time). | 2009-06-15T13:45:30 -\u003e 6/15/2009 1:45:30 PM (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 15/06/2009 13:45:30 (es-ES)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 2009/6/15 13:45:30 (zh-CN) |\n| \"M\", \"m\" | Month/day pattern. | 2009-06-15T13:45:30 -\u003e June 15 (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 15. juni (da-DK)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 15 Juni (id-ID) |\n| \"O\", \"o\" | round-trip date/time pattern. | 2009-06-15T13:45:30 -\u003e 2009-06-15T13:45:30.0000000-07:00\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 2009-06-15T13:45:30.0000000Z\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 2009-06-15T13:45:30.0000000 |\n| \"R\", \"r\" | RFC1123 pattern. | 2009-06-15T13:45:30 -\u003e Mon, 15 Jun 2009 20:45:30 GMT |\n| \"s\"      | Sortable date/time pattern. | 2009-06-15T13:45:30 -\u003e 2009-06-15T13:45:30\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 2009-06-15T13:45:30 |\n| \"t\"      | Short time pattern. | 2009-06-15T13:45:30 -\u003e 1:45 PM (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 13:45 (hr-HR)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 01:45 م (ar-EG) |\n| \"T\"      | Long time pattern. | 2009-06-15T13:45:30 -\u003e 1:45:30 PM (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 13:45:30 (hr-HR)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 01:45:30 م (ar-EG) |\n| \"u\"      | Universal sortable date/time pattern. | 2009-06-15T13:45:30 -\u003e 2009-06-15 13:45:30Z |\n| \"U\"      | Universal full date/time pattern. | 2009-06-15T13:45:30 -\u003e Monday, June 15, 2009 8:45:30 PM (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e den 15 juni 2009 20:45:30 (sv-SE)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e Δευτέρα, 15 Ιουνίου 2009 8:45:30 μμ (el-GR) |\n| \"Y\", \"y\" | Year month pattern. | 2009-06-15T13:45:30 -\u003e June 2009 (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e juni 2009 (da-DK)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e Juni 2009 (id-ID) |\n| Any other single character | Unknown specifier. | Throws a `FormatError`. |\n\n\u003csup\u003e\u003ca href=\"https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings\" target=\"_blank\"\u003eMore info\u003c/a\u003e\u003c/sup\u003e\n\n\u003ch3 id=\"date-custom-formats\"\u003eCustom date and time format strings\u003c/h3\u003e\n\nA date and time format string defines the text representation of a [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) value that results from a formatting operation. A custom format string consists of one or more custom date and time format specifiers. Any string that is not a [standard date and time format string](#date-standard-formats) is interpreted as a custom date and time format string.\n\nThe following table describes the custom date and time format specifiers and displays a result string produced by each format specifier:\n\n| Format specifier | Description | Examples |\n| ---------------- | ----------- | -------- |\n| \"d\" | The day of the month, from 1 through 31. | 2009-06-01T13:45:30 -\u003e 1\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 15 |\n| \"dd\" | The day of the month, from 01 through 31. | 2009-06-01T13:45:30 -\u003e 01\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 15 |\n| \"ddd\" | The abbreviated name of the day of the week. | 2009-06-15T13:45:30 -\u003e Mon (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e Пн (ru-RU)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e lun. (fr-FR) |\n| \"dddd\" | The full name of the day of the week. | 2009-06-15T13:45:30 -\u003e Monday (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e понедельник (ru-RU)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e lundi (fr-FR) |\n| \"f\" | The tenths of a second in a date and time value. | 2009-06-15T13:45:30.6170000 -\u003e 6\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30.05 -\u003e 0 |\n| \"ff\" | The hundredths of a second in a date and time value. | 2009-06-15T13:45:30.6170000 -\u003e 61\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30.0050000 -\u003e 00 |\n| \"fff\" | The milliseconds in a date and time value. | 6/15/2009 13:45:30.617 -\u003e 617\u003cbr\u003e\u003cbr\u003e6/15/2009 13:45:30.0005 -\u003e 000 |\n| \"ffff\" | The ten thousandths of a second in a date and time value. | 2009-06-15T13:45:30.6175000 -\u003e 6175\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30.0000500 -\u003e 0000 |\n| \"fffff\" | The hundred thousandths of a second in a date and time value. | 2009-06-15T13:45:30.6175400 -\u003e 61754\u003cbr\u003e\u003cbr\u003e6/15/2009 13:45:30.000005 -\u003e 00000 |\n| \"ffffff\" | The millionths of a second in a date and time value. | 2009-06-15T13:45:30.6175420 -\u003e 617542\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30.0000005 -\u003e 000000 |\n| \"fffffff\" | The ten millionths of a second in a date and time value. | 2009-06-15T13:45:30.6175425 -\u003e 6175425\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30.0001150 -\u003e 0001150 |\n| \"F\" | If non-zero, the tenths of a second in a date and time value. | 2009-06-15T13:45:30.6170000 -\u003e 6\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30.0500000 -\u003e (no output) |\n| \"FF\" | If non-zero, the hundredths of a second in a date and time value. | 2009-06-15T13:45:30.6170000 -\u003e 61\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30.0050000 -\u003e (no output) |\n| \"FFF\" | If non-zero, the milliseconds in a date and time value. | 2009-06-15T13:45:30.6170000 -\u003e 617\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30.0005000 -\u003e (no output) |\n| \"FFFF\" | If non-zero, the ten thousandths of a second in a date and time value. | 2009-06-15T13:45:30.5275000 -\u003e 5275\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30.0000500 -\u003e (no output) |\n| \"FFFFF\" | If non-zero, the hundred thousandths of a second in a date and time value. | 2009-06-15T13:45:30.6175400 -\u003e 61754\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30.0000050 -\u003e (no output) |\n| \"FFFFFF\" | If non-zero, the millionths of a second in a date and time value. | 2009-06-15T13:45:30.6175420 -\u003e 617542\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30.0000005 -\u003e (no output) |\n| \"FFFFFFF\" | If non-zero, the ten millionths of a second in a date and time value. | 2009-06-15T13:45:30.6175425 -\u003e 6175425\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30.0001150 -\u003e 000115 |\n| \"g\", \"gg\" | The period or era. | 2009-06-15T13:45:30.6170000 -\u003e A.D. |\n| \"h\" | The hour, using a 12-hour clock from 1 to 12. | 2009-06-15T01:45:30 -\u003e 1\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 1 |\n| \"hh\" | The hour, using a 12-hour clock from 01 to 12. | 2009-06-15T01:45:30 -\u003e 01\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 01 |\n| \"H\" | The hour, using a 24-hour clock from 0 to 23. | 2009-06-15T01:45:30 -\u003e 1\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 13 |\n| \"HH\" | The hour, using a 24-hour clock from 00 to 23. | 2009-06-15T01:45:30 -\u003e 01\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 13 |\n| \"K\" | Time zone information. | 2009-06-15T13:45:30 -\u003e -07:00 (depends on local computer settings)\u003cbr\u003e\u003cbr\u003e2009-06-15T08:45:30+00:00 --\u003e +00:00 |\n| \"m\" | The minute, from 0 through 59. | 2009-06-15T01:09:30 -\u003e 9\u003cbr\u003e\u003cbr\u003e2009-06-15T13:29:30 -\u003e 29 |\n| \"mm\" | The minute, from 00 through 59. | 2009-06-15T01:09:30 -\u003e 09\u003cbr\u003e\u003cbr\u003e2009-06-15T01:45:30 -\u003e 45 |\n| \"M\" | The month, from 1 through 12. | 2009-06-15T13:45:30 -\u003e 6 |\n| \"MM\" | The month, from 01 through 12. | 2009-06-15T13:45:30 -\u003e 06 |\n| \"MMM\" | The abbreviated name of the month. | 2009-06-15T13:45:30 -\u003e Jun (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e juin (fr-FR)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e Jun (zu-ZA) |\n| \"MMMM\" | The full name of the month. | 2009-06-15T13:45:30 -\u003e June (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e juni (da-DK)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e uJuni (zu-ZA) |\n| \"s\" | The second, from 0 through 59. | 2009-06-15T13:45:09 -\u003e 9 |\n| \"ss\" | The second, from 00 through 59. | 2009-06-15T13:45:09 -\u003e 09 |\n| \"t\" | The first character of the AM/PM designator. | 2009-06-15T13:45:30 -\u003e P (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 午 (ja-JP)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e (fr-FR) |\n| \"tt\" | The AM/PM designator. | 2009-06-15T13:45:30 -\u003e PM (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 午後 (ja-JP)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e (fr-FR) |\n| \"y\" | The year, from 0 to 99. | 0001-01-01T00:00:00 -\u003e 1\u003cbr\u003e\u003cbr\u003e0900-01-01T00:00:00 -\u003e 0\u003cbr\u003e\u003cbr\u003e1900-01-01T00:00:00 -\u003e 0\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 9\u003cbr\u003e\u003cbr\u003e2019-06-15T13:45:30 -\u003e 19 |\n| \"yy\" | The year, from 00 to 99. | 0001-01-01T00:00:00 -\u003e 01\u003cbr\u003e\u003cbr\u003e0900-01-01T00:00:00 -\u003e 00\u003cbr\u003e\u003cbr\u003e1900-01-01T00:00:00 -\u003e 00\u003cbr\u003e\u003cbr\u003e2019-06-15T13:45:30 -\u003e 19 |\n| \"yyy\" | The year, with a minimum of three digits. | 0001-01-01T00:00:00 -\u003e 001\u003cbr\u003e\u003cbr\u003e0900-01-01T00:00:00 -\u003e 900\u003cbr\u003e\u003cbr\u003e1900-01-01T00:00:00 -\u003e 1900\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 2009 |\n| \"yyyy\" | The year as a four-digit number. | 0001-01-01T00:00:00 -\u003e 0001\u003cbr\u003e\u003cbr\u003e0900-01-01T00:00:00 -\u003e 0900\u003cbr\u003e\u003cbr\u003e1900-01-01T00:00:00 -\u003e 1900\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 2009 |\n| \"yyyyy\" | The year as a five-digit number. | 0001-01-01T00:00:00 -\u003e 00001\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e 02009 |\n| \"z\" | Hours offset from UTC, with no leading zeros. | 2009-06-15T13:45:30-07:00 -\u003e -7 |\n| \"zz\" | Hours offset from UTC, with a leading zero for a single-digit value. | 2009-06-15T13:45:30-07:00 -\u003e -07 |\n| \"zzz\" | Hours and minutes offset from UTC. | 2009-06-15T13:45:30-07:00 -\u003e -07:00 |\n| \":\" | The time separator. | 2009-06-15T13:45:30 -\u003e : (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e . (it-IT)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e : (ja-JP) |\n| \"/\" | The date separator. | 2009-06-15T13:45:30 -\u003e / (en-US)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e - (ar-DZ)\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 -\u003e . (tr-TR) |\n| \"string\"\u003cbr\u003e\u003cbr\u003e'string' | Literal string delimiter. | 2009-06-15T13:45:30 (\"arr:\" h:m t) -\u003e arr: 1:45 P\u003cbr\u003e\u003cbr\u003e2009-06-15T13:45:30 ('arr:' h:m t) -\u003e arr: 1:45 P |\n| % | Defines the following character as a custom format specifier. | 2009-06-15T13:45:30 (%h) -\u003e 1 |\n| \\ | The escape character. | 2009-06-15T13:45:30 (h \\h) -\u003e 1 h |\n| Any other character | The character is copied to the result string unchanged. | 2009-06-15T01:45:30 (arr hh:mm t) -\u003e arr 01:45 A |\n\n\u003csup\u003e\u003ca href=\"https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings\" target=\"_blank\"\u003eMore info\u003c/a\u003e\u003c/sup\u003e\n\n[1]: https://img.shields.io/npm/v/dotnet-format.svg?label=dotnet-format\u0026cacheSeconds=3600\n[2]: https://www.npmjs.com/package/dotnet-format\n\n[3]: https://img.shields.io/github/license/Kir-Antipov/dotnet-format.svg?label=License\u0026cacheSeconds=36000\n[4]: https://raw.githubusercontent.com/Kir-Antipov/dotnet-format/master/LICENSE.md","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKira-NT%2Fdotnet-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKira-NT%2Fdotnet-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKira-NT%2Fdotnet-format/lists"}