{"id":22091325,"url":"https://github.com/msangel/strftime4j","last_synced_at":"2026-02-25T20:31:19.923Z","repository":{"id":57743435,"uuid":"338918751","full_name":"msangel/strftime4j","owner":"msangel","description":"strftime time formatter for java","archived":false,"fork":false,"pushed_at":"2025-03-14T20:02:02.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-08T04:02:06.426Z","etag":null,"topics":["date-formatting","java","java-8","java-ports","strftime","time-formatting"],"latest_commit_sha":null,"homepage":"","language":"Java","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/msangel.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-02-14T22:51:43.000Z","updated_at":"2025-03-14T20:02:05.000Z","dependencies_parsed_at":"2024-12-19T23:25:29.861Z","dependency_job_id":"63891253-8d9a-444f-b88e-f400e87d6cbf","html_url":"https://github.com/msangel/strftime4j","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/msangel/strftime4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msangel%2Fstrftime4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msangel%2Fstrftime4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msangel%2Fstrftime4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msangel%2Fstrftime4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msangel","download_url":"https://codeload.github.com/msangel/strftime4j/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msangel%2Fstrftime4j/sbom","scorecard":{"id":665254,"data":{"date":"2025-08-11","repo":{"name":"github.com/msangel/strftime4j","commit":"40c4c4c99df5b4eb6486074aac4c0aeeddc01d1d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/msangel/strftime4j/maven.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/msangel/strftime4j/maven.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/maven.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T17:47:43.906Z","repository_id":57743435,"created_at":"2025-08-21T17:47:43.906Z","updated_at":"2025-08-21T17:47:43.906Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29838042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T19:08:47.527Z","status":"ssl_error","status_checked_at":"2026-02-25T18:59:04.705Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["date-formatting","java","java-8","java-ports","strftime","time-formatting"],"created_at":"2024-12-01T02:19:15.286Z","updated_at":"2026-02-25T20:31:19.890Z","avatar_url":"https://github.com/msangel.png","language":"Java","readme":"# strftime4j\nstrftime time formatter for java\n\nSupport all the standard syntax of `strftime` function in C.\n\nThe Ruby's implementation was taken as an example spec(it also follows C conventions).\n\n![Build Status](https://github.com/msangel/strftime4j/actions/workflows/maven.yml/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/msangel/strftime4j/badge.svg?branch=master)](https://coveralls.io/github/msangel/strftime4j?branch=master) [![Maven Central](https://img.shields.io/maven-central/v/ua.co.k/strftime4j.svg?label=Maven%20Central)](https://central.sonatype.com/search?q=ua.co.k%3Astrftime4j)\n\n## Installing\nAvailable in maven central:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eua.co.k\u003c/groupId\u003e\n    \u003cartifactId\u003estrftime4j\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.6\u003c/version\u003e\n\u003c/dependency\u003e\n```\nOr gradle:\n`ua.co.k:strftime4j:+`\n\n## Usage example:\n```java\n// strict mode allow to ensure that the string will be formatted as expected:\nZonedDateTime t = ZonedDateTime.parse(\"2021-02-16T23:43:00-02:00\");\nString res = StrftimeFormatter.ofStrictPattern(\"Printed on %m/%d/%Y\").format(t);\nassertEquals(\"Printed on 02/16/2021\", res);\n\n// strict mode will throw an exception if input object does \n// not contains required temporal field\ntry {\n    YearMonth ym = YearMonth.of(2020, 1);\n    StrftimeFormatter.ofStrictPattern(\"Printed on %m/%d/%Y\").format(ym);\n} catch (Exception e) {\n    // exception caught, \n    // as the input object YearMonth does not \n    // contains information about the Date in it!\n}\n\n// safe mode will ignore missing fields\nYearMonth ym = YearMonth.of(2020, 1);\nres = StrftimeFormatter.ofSafePattern(\"Printed on %m/%d/%Y\").format(ym);\nassertEquals(\"Printed on 01//2020\", res);\n```\nNote:\nExpression parsing behaves the same way in both strict and safe mode according to strftime function expectations. The difference between them is only in the way they handle missing date/time properties from the input date/time object during rendering time.\n\n\n## Supported types\n* `java.util.Date` and its successors\n* `java.util.Calendar`\n* Java8 time API types, like:\n    * `java.time.Instant`\n    * `java.time.OffsetDateTime`\n    * `java.time.ZonedDateTime`\n    * `java.time.LocalDateTime`\n    * `java.time.ChronoLocalDateTime`\n    * `java.time.Year`\n    * any other `TemporalAccessor` successors\n\n\n## Thread-safety\nThis library is thread-safe. \nAfter creation the `StrftimeFormatter` object is immutable and can be used in a multithreaded environment. \n\n## Possible future optimisations:\nThis library is ready for use.\nBut there are no limits for perfection.\nHere's a list of some improvements, I'd like to implement here at some future:\n\n* Use `FromTemporalFieldFormat` instead of `PatternFormat` where possible, as in the end they both use the same low-level API, but in the first case - fewer objects will be created(also less memory and less stacktrace to the same important exception in the `strict` mode).\n* Instead of `PatternFormat` create a new kind of `HybridFormat` that will work with conversion combinations and will delegate its parts rendering to known conversions.\n* Expose method for short timezone names aliases mapping, so end-user be able to override short timezone names with own mapping.\n* Keep codepoints list in `TextToken` as sublist from the input(it is immutable anyway). Less memory will be used.\n## Publishing\nOn wiki page: https://github.com/msangel/strftime4j/wiki/Publish\n\n## License\nStandard MIT license.\n\nIn short:\n* You may use the work commercially\n* You may make changes to the work\n* You may distribute the compiled code and/or source\n* You may incorporate the work into something that has a more restrictive license.\n* You may use the work for private use.\n* The work is provided \"as is\". You may not hold the author liable.\n\nIn long [read here](https://github.com/msangel/strftime4j/blob/master/LICENSE)\n\n## Further reading:\n* http://www.strfti.me/\n* https://ruby-doc.org/core-3.0.0/Time.html#method-i-strftime\n* https://www.php.net/manual/ru/function.strftime.php\n* https://strftime.org/\n* What version should be? https://octopus.com/blog/maven-versioning-explained\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsangel%2Fstrftime4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsangel%2Fstrftime4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsangel%2Fstrftime4j/lists"}