Skip to content

Add time variables for snippets#41653

Merged
jrieken merged 5 commits intomicrosoft:masterfrom
usernamehw:time_variables_for_snippets
Jan 17, 2018
Merged

Add time variables for snippets#41653
jrieken merged 5 commits intomicrosoft:masterfrom
usernamehw:time_variables_for_snippets

Conversation

@usernamehw
Copy link
Contributor

@usernamehw usernamehw commented Jan 16, 2018


resolve(variable: Variable): string {
const { name } = variable;
const zeroPad = (n: string): string => n.length < 2 ? `0${n}` : n;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better use the existing util from base/common/strings#pad

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't know about it

@jrieken jrieken self-assigned this Jan 16, 2018
@jrieken jrieken added this to the January 2018 milestone Jan 16, 2018
@jrieken jrieken added feature-request Request for new features or functionality snippets labels Jan 16, 2018
@jrieken
Copy link
Member

jrieken commented Jan 16, 2018

Would you might adding a test? At least for manifesting the names of the those variables? Maybe have your code so that the date to be used is an optional ctor-argument. Thanks already.

@usernamehw
Copy link
Contributor Author

usernamehw commented Jan 17, 2018

Travis-CI build stuck > 10 hours.

@jrieken
Copy link
Member

jrieken commented Jan 17, 2018

lgtm. Thanks

@jrieken jrieken merged commit cef3b30 into microsoft:master Jan 17, 2018
@taivu
Copy link

taivu commented Jan 26, 2018

has this been released into a build yet? do I use it like ${CURRENT_YEAR}?

@usernamehw
Copy link
Contributor Author

@taivu currently it's in Insiders build

@jrieken jrieken mentioned this pull request Jan 29, 2018
2 tasks
@jrieken jrieken added on-testplan release-notes Release notes issues labels Jan 29, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature-request Request for new features or functionality on-testplan release-notes Release notes issues snippets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: expose date information as available variable(s) when creating snippets.

3 participants