{"id":23762390,"url":"https://github.com/thymeleaf/thymeleaf-extras-java8time","last_synced_at":"2025-04-12T18:50:20.348Z","repository":{"id":23279934,"uuid":"26638713","full_name":"thymeleaf/thymeleaf-extras-java8time","owner":"thymeleaf","description":"Thymeleaf \"extras\" dialect for formatting and creating Java 8 Time API objects","archived":false,"fork":false,"pushed_at":"2022-09-26T21:33:21.000Z","size":177,"stargazers_count":107,"open_issues_count":0,"forks_count":35,"subscribers_count":12,"default_branch":"3.0-master","last_synced_at":"2025-04-03T22:08:41.197Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thymeleaf.png","metadata":{"files":{"readme":"README.markdown","changelog":"ChangeLog.txt","contributing":"CONTRIBUTING.markdown","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-14T13:00:44.000Z","updated_at":"2025-01-11T10:50:37.000Z","dependencies_parsed_at":"2022-08-21T15:00:33.453Z","dependency_job_id":null,"html_url":"https://github.com/thymeleaf/thymeleaf-extras-java8time","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thymeleaf%2Fthymeleaf-extras-java8time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thymeleaf%2Fthymeleaf-extras-java8time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thymeleaf%2Fthymeleaf-extras-java8time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thymeleaf%2Fthymeleaf-extras-java8time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thymeleaf","download_url":"https://codeload.github.com/thymeleaf/thymeleaf-extras-java8time/tar.gz/refs/heads/3.0-master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618220,"owners_count":21134199,"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":[],"created_at":"2024-12-31T21:19:06.598Z","updated_at":"2025-04-12T18:50:20.326Z","avatar_url":"https://github.com/thymeleaf.png","language":"Java","readme":"\nThymeleaf - Module for Java 8 Time API compatibility\n====================================================\n\n------------------------------------------------------------------------------\n\nStatus\n------\n\nThis is a *thymeleaf extras* module, not a part of the Thymeleaf core (and as\nsuch following its own versioning schema), but fully supported by the \nThymeleaf team.\n\nCurrent versions: \n\n  * **Version 3.1.0.RELEASE** - for Thymeleaf 3.0 (requires Thymeleaf 3.0.0+)\n  * **Version 2.1.0.RELEASE** - for Thymeleaf 2.1 (requires Thymeleaf 2.1.3+)\n\n\nLicense\n-------\n\nThis software is licensed under the [Apache License 2.0]\n(http://www.apache.org/licenses/LICENSE-2.0.html).\n\n\nRequirements (3.0.x)\n--------------------\n\n  *   Java **8**\n  *   Thymeleaf **3.0.0+**\n\n\nMaven info\n----------\n\n  *   groupId: `org.thymeleaf.extras`   \n  *   artifactId: `thymeleaf-extras-java8time`\n\n\nDistribution packages\n---------------------\n\nDistribution packages (binaries + sources + javadoc) can be downloaded from [SourceForge](http://sourceforge.net/projects/thymeleaf/files/thymeleaf-extras-java8time/).\n\n\nInstallation\n------------\n\nJust add the `org.thymeleaf.extras.java8time.dialect.Java8TimeDialect`\nclass to the list of dialects in your TemplateEngine implementation, and you will\nhave the `#temporals` object available to be used in your templates.\n\n```java\nTemplateEngine templateEngine = new TemplateEngine();\ntemplateEngine.addDialect(new Java8TimeDialect());\n...\n```\n\nFeatures\n--------\n\nThis module adds a `#temporals` object similar to the `#dates` or `#calendars` ones in\nthe Standard Dialect, allowing the formatting and creation of temporal objects from\nThymeleaf templates.\n\n![Java 8 Time API](/src/main/resources/temporal.png \"Java 8 Time API\")\n\n\nUsage\n-----\n\n```java\n/*\n * =============================================================================\n * See javadoc API for class org.thymeleaf.extras.java8time.expression.Temporals\n * =============================================================================\n */\n\n/*\n * Format date with the standard locale format\n * Also works with arrays, lists or sets\n */\n${#temporals.format(temporal)}\n${#temporals.arrayFormat(temporalsArray)}\n${#temporals.listFormat(temporalsList)}\n${#temporals.setFormat(temporalsSet)}\n\n/*\n * Format date with the standard format for the provided locale\n * Also works with arrays, lists or sets\n */\n${#temporals.format(temporal, locale)}\n${#temporals.arrayFormat(temporalsArray, locale)}\n${#temporals.listFormat(temporalsList, locale)}\n${#temporals.setFormat(temporalsSet, locale)}\n\n/*\n * Format date with the specified pattern\n * SHORT, MEDIUM, LONG and FULL can also be specified to used the default java.time.format.FormatStyle patterns\n * Also works with arrays, lists or sets\n */\n${#temporals.format(temporal, 'dd/MMM/yyyy HH:mm')}\n${#temporals.format(temporal, 'dd/MMM/yyyy HH:mm', 'Europe/Paris')}\n${#temporals.arrayFormat(temporalsArray, 'dd/MMM/yyyy HH:mm')}\n${#temporals.listFormat(temporalsList, 'dd/MMM/yyyy HH:mm')}\n${#temporals.setFormat(temporalsSet, 'dd/MMM/yyyy HH:mm')}\n\n/*\n * Format date with the specified pattern and locale\n * Also works with arrays, lists or sets\n */\n${#temporals.format(temporal, 'dd/MMM/yyyy HH:mm', locale)}\n${#temporals.arrayFormat(temporalsArray, 'dd/MMM/yyyy HH:mm', locale)}\n${#temporals.listFormat(temporalsList, 'dd/MMM/yyyy HH:mm', locale)}\n${#temporals.setFormat(temporalsSet, 'dd/MMM/yyyy HH:mm', locale)}\n\n/*\n * Format date with ISO-8601 format\n * Also works with arrays, lists or sets\n */\n${#temporals.formatISO(temporal)}\n${#temporals.arrayFormatISO(temporalsArray)}\n${#temporals.listFormatISO(temporalsList)}\n${#temporals.setFormatISO(temporalsSet)}\n\n/*\n * Obtain date properties\n * Also works with arrays, lists or sets\n */\n${#temporals.day(temporal)}                    // also arrayDay(...), listDay(...), etc.\n${#temporals.month(temporal)}                  // also arrayMonth(...), listMonth(...), etc.\n${#temporals.monthName(temporal)}              // also arrayMonthName(...), listMonthName(...), etc.\n${#temporals.monthNameShort(temporal)}         // also arrayMonthNameShort(...), listMonthNameShort(...), etc.\n${#temporals.year(temporal)}                   // also arrayYear(...), listYear(...), etc.\n${#temporals.dayOfWeek(temporal)}              // also arrayDayOfWeek(...), listDayOfWeek(...), etc.\n${#temporals.dayOfWeekName(temporal)}          // also arrayDayOfWeekName(...), listDayOfWeekName(...), etc.\n${#temporals.dayOfWeekNameShort(temporal)}     // also arrayDayOfWeekNameShort(...), listDayOfWeekNameShort(...), etc.\n${#temporals.hour(temporal)}                   // also arrayHour(...), listHour(...), etc.\n${#temporals.minute(temporal)}                 // also arrayMinute(...), listMinute(...), etc.\n${#temporals.second(temporal)}                 // also arraySecond(...), listSecond(...), etc.\n${#temporals.nanosecond(temporal)}             // also arrayNanosecond(...), listNanosecond(...), etc.\n\n/*\n * Create temporal (java.time.Temporal) objects from its components\n */\n${#temporals.create(year,month,day)}                                // return a instance of java.time.LocalDate\n${#temporals.create(year,month,day,hour,minute)}                    // return a instance of java.time.LocalDateTime\n${#temporals.create(year,month,day,hour,minute,second)}             // return a instance of java.time.LocalDateTime\n${#temporals.create(year,month,day,hour,minute,second,nanosecond)}  // return a instance of java.time.LocalDateTime\n\n/*\n * Create a temporal (java.time.Temporal) object for the current date and time\n */\n${#temporals.createNow()}                      // return a instance of java.time.LocalDateTime\n${#temporals.createNowForTimeZone(zoneId)}     // return a instance of java.time.ZonedDateTime\n${#temporals.createToday()}                    // return a instance of java.time.LocalDate\n${#temporals.createTodayForTimeZone(zoneId)}   // return a instance of java.time.LocalDate\n\n/*\n * Create a temporal (java.time.Temporal) object for the provided date\n */\n${#temporals.createDate(isoDate)}              // return a instance of java.time.LocalDate\n${#temporals.createDateTime(isoDate)}          // return a instance of java.time.LocalDateTime\n${#temporals.createDate(isoDate, pattern)}     // return a instance of java.time.LocalDate\n${#temporals.createDateTime(isoDate, pattern)} // return a instance of java.time.LocalDateTime\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthymeleaf%2Fthymeleaf-extras-java8time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthymeleaf%2Fthymeleaf-extras-java8time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthymeleaf%2Fthymeleaf-extras-java8time/lists"}