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

Make Template.template public #53

Closed
Robuske opened this issue Aug 1, 2020 · 1 comment
Closed

Make Template.template public #53

Robuske opened this issue Aug 1, 2020 · 1 comment

Comments

@Robuske
Copy link

Robuske commented Aug 1, 2020

Hello, first of all, thank you for all your work on this library.

Apart from that, the title says it all, would be nice to be able to use Template values for raw formatting/parsing. I thought about making a micro PR, but I feared there was a reason for it not being public, besides it's a change so small that you could make trough Github edit.

P.S.: Am I missing something or is it not possible to parse a date with the format y-MM-dd without using the rawFormat? I thought that using the iso8601 Calendar would work, but it does not seem to be the case.

@davedelong
Copy link
Owner

On the parsing side, Fixed has an initializer that takes a string and a hard-coded format string

For formatting, there's a .format(raw:) method to which you can pass a hard-coded format string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants