-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add year to project template variables #3795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
I wonder, is there perhaps a way to learn about the current year without pulling in all of chrono/time? |
Good question! (New to Rust, so I just grabbed Looks like we can peel away one layer at least and use (time::now().tm_year + 1900).to_string() @alexcrichton, would that be acceptable? I think if we try to dump |
@jryans yeah seems reasonable to me! I suspect |
@bors: r+ Thanks! |
📌 Commit 47221e9 has been approved by |
Add year to project template variables This adds the current year as a `year` variable for project templates. Some license files / headers include the year, so this should make it easier to include those in a template.
☀️ Test successful - status-appveyor, status-travis |
This adds the current year as a
year
variable for project templates. Some license files / headers include the year, so this should make it easier to include those in a template.