Skip to content
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

Add time variables for snippets #41653

Merged
merged 5 commits into from
Jan 17, 2018
Merged

Add time variables for snippets #41653

merged 5 commits into from
Jan 17, 2018

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