-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
SIGSEGV in DateTime::format() #76
Comments
Also, the
|
I would actually either remove the function -- it looks too heavy -- or replace it with something else. |
I'm not against under the condition, that the new solution will support arbitrary months, weekdays, yeardays and halfdays labeling. |
I think it is not required for basic date and time support and is implemented trivially on the user's side. |
The easiest option is to parse the output of |
Why, if that info can be fetched directly from the |
Shame on me, I missed listWeekDay[x.weekDay()] + x.format(' %d.') + listYearMonth[x.month] + x.format(' %Y ' + translation['at'].replace('%', '%%') + ' %h:%m:%s') instead of x.format('%A %d. %B %Y ' + translation['at'].replace('%', '%%') + ' %h:%m:%s', {$weekday => listWeekDay, $yearmonth => listYearMonth}) is less efficient, but is maybe even slightly more readable than the latter one. |
Agree. |
Btw it might make sense to slightly improve the declaration
{ TIME_Format2, "format(invar self: DateTime, invar names: map<string,list<string>>, format = '%Y-%M-%D, %H:%I:%S' ) => string" }
by using enum:{ TIME_Format2, "format(invar self: DateTime, invar names: map<enum<month, week, day, halfday>,list<string>>, format = '%Y-%M-%D, %H:%I:%S' ) => string" }
The text was updated successfully, but these errors were encountered: