[Mono-list] DateTime.GetDateTimeFormats
Atsushi Eno
atsushi at ximian.com
Thu Sep 13 04:37:24 EDT 2007
Hello,
We do not just copycat .NET culture data but fix those missing stuff
based on bug reports.
Anyways, accessing GetDateTimeFormats() results by index is
bogus. It even won't work when .NET reuturns string array as
{"foo", "bar"}
while we return the values as
{"bar", "foo"}
Such expectation of order is inappropriate.
Note that when you call GetDateTimeFormats() it depends on your locale
(CultureInfo. CurrentCulture). Accessing the resulting array by index
is (again) inappropriate here.
Atsushi Eno
Matthias Blondeel wrote:
>
> Dear MonoDevelopers,
>
>
>
> I don’t know if this should qualify as a bug or as a new feature, but
> there are some lacking formats in the array returned by DateTime.
> GetDateTimeFormats()
>
> The Microsoft version returns an array with I think about a 100
> formats, whereas the mono version returns an array of only 26 I think.
>
>
>
> I don’t know if this is wanted or not. Maybe a warning in the
> documentation or enlarging the array to the same number of formats
> then Microsoft could be done, so that applications don’t give index
> out of range exceptions.
>
> Anyway, just wanted to be sure that you guys were aware of this.
>
> Regards,
>
> Matthias* *
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
More information about the Mono-list
mailing list