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 month names in StrToDate and StrToDateTime #2

Open
CudaText-addons opened this issue Jun 5, 2022 · 0 comments
Open

Allow month names in StrToDate and StrToDateTime #2

CudaText-addons opened this issue Jun 5, 2022 · 0 comments

Comments

@CudaText-addons
Copy link

Quote from the Lazarus issue tracker. Please also support this in Delphi.

Motivated by freepascal.org/lazarus/lazarus#39779 (closed) I thought about the issue that StrToDate and StrToDateTime allow only numeric values in their date/time parts. The format expected is taken from the ShortDateFormat of the FormatSettings record where the month is assumed to be in the one- or two-digit representation.

But why can there be only numbers in the month part? In the FormatSettings.ShortDateFormat the month can be specified as 'mmm' or even 'mmmm' - and this inserts the short or long month names in the strings created by DateToStr. However, these strings cannot be converted back to dates by calling the inverse StrToDate function? I know that Delphi does the same, it accepts only numeric month strings. But I don't see a real reason for this asymmetry.

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

1 participant