oridb/mc

"out of bounds access" when using custom formatting with weekday modifiers

FrankRuben opened this issue · 1 comments

Hi,

when using some code similar to the formatting sample in the library documentation,
I'm getting an "out of bounds access" error.
This can be fixed by changing the following lines in ~/date/fmt.myr (from d.day to d.wday):

	| 'a':	std.sbfmt(sb, "{}", _names.abbrevday[d.wday])
	| 'A':	std.sbfmt(sb, "{}", _names.fullday[d.wday])

HTH, Frank

oridb commented

Fixed, and added tests. Feel free to send a pull request next time, or toss a patch on the mailing list.