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

Allow format strings in ThisAssembly.Strings #299

Closed
kzu opened this issue May 15, 2024 · 0 comments · Fixed by #313
Closed

Allow format strings in ThisAssembly.Strings #299

kzu opened this issue May 15, 2024 · 0 comments · Fixed by #313
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kzu
Copy link
Member

kzu commented May 15, 2024

So that the following is valid in a resx: expires on {date:yyyy-MM-dd},

@kzu kzu added enhancement New feature or request good first issue Good for newcomers labels May 15, 2024
kzu added a commit that referenced this issue Jun 9, 2024
The following are now valid and produce the expected results, just as an equivalent interpolated string would:

- `expires on {date:yyyy-MM-dd}`
- `expires on year {date:yyyy} (wait until {date:MM}`
- `expires on {0:yyyy-MM}`

Note how the same argument name can be used multiple times with different output formatting for increased flexibility and arg reuse.

Fixes #299
@kzu kzu closed this as completed in #313 Jun 9, 2024
kzu added a commit that referenced this issue Jun 9, 2024
The following are now valid and produce the expected results, just as an equivalent interpolated string would:

- `expires on {date:yyyy-MM-dd}`
- `expires on year {date:yyyy} (wait until {date:MM}`
- `expires on {0:yyyy-MM}`

Note how the same argument name can be used multiple times with different output formatting for increased flexibility and arg reuse.

Fixes #299
@devlooped devlooped locked and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant