| Summary: | [templates] Add date component variable (month, day) to the Code/Editor Templates Variables | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Martin Ahrer <martin.ahrer> |
| Component: | Text | Assignee: | JDT-Text-Inbox <jdt-text-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | daniel_megert |
| Version: | 3.6.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Currently code template variables offer variables ${date} and ${year}. However in an environment where file headers contain a date (of creation) the needs to follow a fixed pattern (e.g. YYYY-MM-DD) the date can only be composed by something like ${year}-${month}-${day}. So it would be helpful to have those additional variables. Alternatively to adding new variables I could imagine that the templates support evaluating simple Java code snippets like: "DateFormat.getDateInstance().format(new java.util.Date())" This would open up a lot of opportunities to extend templates.