{"id":20459732,"url":"https://github.com/rosbit/cn-capitalizer","last_synced_at":"2026-02-25T21:31:00.962Z","repository":{"id":57641935,"uuid":"435153724","full_name":"rosbit/cn-capitalizer","owner":"rosbit","description":"数字中文大写。支持金额、年/月/日，符合国家合同规范、支票规范。一遍扫描完成转换，支持整型/浮点型/字符串等类型，支持正负数。","archived":false,"fork":false,"pushed_at":"2021-12-11T01:32:01.000Z","size":9,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T05:51:39.248Z","etag":null,"topics":["cheque-month-day","digit-cn-capitalizer","money-amount"],"latest_commit_sha":null,"homepage":"","language":"Go","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/rosbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-05T11:57:56.000Z","updated_at":"2024-07-11T13:09:24.000Z","dependencies_parsed_at":"2022-09-26T16:40:33.940Z","dependency_job_id":null,"html_url":"https://github.com/rosbit/cn-capitalizer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rosbit/cn-capitalizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Fcn-capitalizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Fcn-capitalizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Fcn-capitalizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Fcn-capitalizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rosbit","download_url":"https://codeload.github.com/rosbit/cn-capitalizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Fcn-capitalizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29841532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T21:18:31.832Z","status":"ssl_error","status_checked_at":"2026-02-25T21:18:29.265Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cheque-month-day","digit-cn-capitalizer","money-amount"],"created_at":"2024-11-15T12:17:07.709Z","updated_at":"2026-02-25T21:31:00.916Z","avatar_url":"https://github.com/rosbit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 数字转为中文大写\n\n一遍扫描，全程无替换操作。\n\n 1. 金额\n    - 可以转换到`万万亿`级别\n    - 如有需要，可以在单位中追加更高级别\n 1. 年份\n    - 2021可以转为“贰零贰壹”或“贰仟零贰拾壹”\n 1. 月份\n    - 支持支票规范的月份，如10月转为“零拾”月\n    - 普通月份支持，如10月转为“拾”月\n 1. 日份\n    - 支持支票规范的日份，如20日转为“零贰拾”日\n    - 普通日份支持，如20日转为“廿”日\n\n### 使用方法\n - 见测试程序`currency_test.go`、`date_test.go`\n   ```bash\n   $ go test\n   ----- 金额 ----\n   435235324532.00 =\u003e 肆仟叁佰伍拾贰亿叁仟伍佰叁拾贰万肆仟伍佰叁拾贰元整\n   100.02 =\u003e 壹佰元零贰分\n   100.20 =\u003e 壹佰元零贰角\n   10.23 =\u003e 壹拾元零贰角叁分\n   101.23 =\u003e 壹佰零壹元贰角叁分\n   101.03 =\u003e 壹佰零壹元零叁分\n   10100.02 =\u003e 壹万零壹佰元零贰分\n   340210100.02 =\u003e 叁亿肆仟零贰拾壹万零壹佰元零贰分\n   -340210100.02 =\u003e 负叁亿肆仟零贰拾壹万零壹佰元零贰分\n   3400000000.02 =\u003e 叁拾肆亿元零贰分\n   3400000.02 =\u003e 叁佰肆拾万元零贰分\n   4352352343400000000.00 =\u003e 肆佰叁拾伍万万亿贰仟叁佰伍拾贰万亿叁仟肆佰叁拾肆亿元整\n   14352352343400000000 =\u003e 壹仟肆佰叁拾伍万万亿贰仟叁佰伍拾贰万亿叁仟肆佰叁拾肆亿元整\n   214352352343399989248.00 =\u003e 超大数字\n   -214352352343399989248.00 =\u003e 超小数字\n   0.00 =\u003e 零元整\n   0.12 =\u003e 壹角贰分\n   9999 =\u003e 玖仟玖佰玖拾玖元整\n   19800 =\u003e 壹万玖仟捌佰元整\n   2980 =\u003e 贰仟玖佰捌拾元整\n   500200 =\u003e 伍拾万零贰佰元整\n   103 =\u003e 壹佰零叁元整\n   32766 =\u003e 叁万贰仟柒佰陆拾陆元整\n   -100.23 =\u003e 负壹佰元零贰角叁分\n   0 =\u003e 零元整\n   ---- 年份 ----\n   2021 =\u003e 贰仟零贰拾壹 (with base) \n   2021 =\u003e 贰零贰壹 (without base)\n   19800 =\u003e 壹万玖仟捌佰 (with base) \n   19800 =\u003e 壹玖捌零零 (without base)\n   2980 =\u003e 贰仟玖佰捌拾 (with base) \n   2980 =\u003e 贰玖捌零 (without base)\n   500200 =\u003e 伍拾万零贰佰 (with base) \n   500200 =\u003e 伍零零贰零零 (without base)\n   103 =\u003e 壹佰零叁 (with base) \n   103 =\u003e 壹零叁 (without base)\n   32766 =\u003e 叁万贰仟柒佰陆拾陆 (with base) \n   32766 =\u003e 叁贰柒陆陆 (without base)\n   0 =\u003e 零 (with base) \n   0 =\u003e 零 (without base)\n   -100 =\u003e 公元前壹佰 (with base) \n   -100 =\u003e 公元前壹零零 (without base)\n   ---- 月份 ----\n   -1 =\u003e 超小数字\n   0 =\u003e 超小数字\n   1 =\u003e 壹\n   9 =\u003e 玖\n   10 =\u003e 拾\n   11 =\u003e 拾壹\n   12 =\u003e 拾贰\n   13 =\u003e 超大数字\n   ---- 日份 ----\n   -1 =\u003e 超小数字\n   0 =\u003e 超小数字\n   1 =\u003e 壹\n   9 =\u003e 玖\n   10 =\u003e 拾\n   11 =\u003e 拾壹\n   12 =\u003e 拾贰\n   20 =\u003e 廿\n   21 =\u003e 廿壹\n   30 =\u003e 卅\n   31 =\u003e 卅壹\n   32 =\u003e 超大数字\n   ---- 用于支票的月份 ----\n   0 =\u003e 超小数字\n   1 =\u003e 零壹\n   10 =\u003e 零拾\n   11 =\u003e 壹拾壹\n   12 =\u003e 壹拾贰\n   13 =\u003e 超大数字\n   ---- 用于支票的日份 ----\n   0 =\u003e 超小数字\n   1 =\u003e 零壹\n   10 =\u003e 零拾\n   19 =\u003e 壹拾玖\n   20 =\u003e 零贰拾\n   29 =\u003e 贰拾玖\n   30 =\u003e 零叁拾\n   31 =\u003e 叁拾壹\n   32 =\u003e 超大数字\n   PASS\n   ok  \tcn-capitalizer\t0.145s\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosbit%2Fcn-capitalizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frosbit%2Fcn-capitalizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosbit%2Fcn-capitalizer/lists"}