-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Add more time-based variables for snippets #46049
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 more time-based variables for snippets #46049
Conversation
We want it now. Please use |
|
Are we talking about changing already defined ones or adding 4 new variables? There might be cases in which someone with localized version would want to show the default (English). |
Those defined in this PR, also don't substring the long variants but have them separately as short versions. |
|
|
||
| resolve(variable: Variable): string { | ||
| const { name } = variable; | ||
| const dayNames = [nls.localize('Sunday', "Sunday"), nls.localize('Monday', "Monday"), nls.localize('Tuesday', "Tuesday"), nls.localize('Wednesday', "Wednesday"), nls.localize('Thursday', "Thursday"), nls.localize('Friday', "Friday"), nls.localize('Saturday', "Saturday")]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to keep those as static readonly propoerties because we don't need to recompute those string-arrays all the time. Otherwise looking good.
jrieken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. thanks
Fixes #43140
Not 100% sure about short months:
SepvsSept. They currently all 3-letter abbreviations and can be easily aligned:If it's critical it can be changed to
Sept. In that caseJun&Julwould beJune&July, I guess...If someone wants localized versions -
New issuebutton awaits.