Commit Graph
182 Commits
Author SHA1 Message Date
Jb Evain 1f79a557b1 2010-06-21 Jb Evain <[email protected]>
* CharUnicodeInfo.cs: make static.


svn path=/trunk/mcs/; revision=159260
2010-06-21 12:48:06 +00:00
Jb Evain 7d6e33a820 2010-06-21 Jb Evain <[email protected]>
* CultureNotFoundException.cs: add it to Moonlight.


svn path=/trunk/mcs/; revision=159259
2010-06-21 12:46:49 +00:00
Jb Evain d808b77558 2010-06-21 Jb Evain <[email protected]>
* TimeSpanStyles.cs: add to Moonlight.


svn path=/trunk/mcs/; revision=159256
2010-06-21 12:38:39 +00:00
Zoltan Varga 0d4aa9fc89 2010-04-19 Zoltan Varga <[email protected]>
* CompareInfo.cs (IndexOf): Return startIndex instead of 0 for empty strings.
	Fixes #597604.

svn path=/trunk/mcs/; revision=155698
2010-04-19 08:28:50 +00:00
Jb Evain 116b2ee12f use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153664
2010-03-16 12:15:11 +00:00
Gonzalo Paniagua Javier 52e95a310a 2010-02-28 Gonzalo Paniagua Javier <[email protected]>
* CultureNotFoundException.cs: new 4.0 type.
	* CultureTypes.cs: add [Obsolete] for 2 values.
	* TimeSpanStyles.cs: new 4.0 enum.


svn path=/trunk/mcs/; revision=152626
2010-02-28 18:00:18 +00:00
Jb Evain 5a6d3bf3bf 2009-12-09 Jb Evain <[email protected]>
* StringInfo.cs: default constructor falls back to an empty string info.


svn path=/trunk/mcs/; revision=147936
2009-12-09 19:22:33 +00:00
Rolf Bjarne Kvinge c082e3b108 2009-11-04 Rolf Bjarne Kvinge <[email protected]>
* CultureInfo.cs: Allow neutral cultures, and fix zh-Hans/zh-Hant
	- they're stored internally as zh-chs/zh-cht, and only visible as
	zh-Hans/zh-Hant. zh-CHS/zh-CHS are invalid cultures in SL.

svn path=/trunk/mcs/; revision=145464
2009-11-05 09:34:08 +00:00
Sebastien Pouliot 3594bcce41 In Test/System.Globalization:
2009-10-29  Sebastien Pouliot  <[email protected]>

	* CompareInfoTest.cs: Add test cases to validate parameters

In System.Globalization:
2009-10-29  Sebastien Pouliot  <[email protected]>

	* CompareInfo.cs: Add/fix CompareOptions validations. Reduce code
	duplication in Compare methods (wrt CompareOptions). Fix 
	calculation bug	in Compare(string,int.string,int,CompareOptions).


svn path=/trunk/mcs/; revision=145023
2009-10-29 14:11:53 +00:00
Sebastien Pouliot 07efc64d03 In System:
2009-10-27  Sebastien Pouliot  <[email protected]>

	* String.cs: Remove unused (and unneeded) internal call defs.
	Reduce duplication (and fix test) for Concat (object,object).
	Avoid allocating zero-length strings in the cases where the
	FX does not do so.

In Test/System.Text:
2009-10-27  Sebastien Pouliot  <[email protected]>

	* UnicodeEncodingTest.cs: Add test cases with an odd number of 
	bytes being used in GetString (it does not crash but it does not
	work like MS FX either).

In Test/System:
2009-10-27  Sebastien Pouliot  <[email protected]>

	* StringTest.cs: Add test case for methods that can return
	empty strings.

In System.Globalization:
2009-10-27  Sebastien Pouliot  <[email protected]>

	* TextInfo.cs: Avoid allocating zero-length strings in ToLower 
	and ToUpper methods


svn path=/trunk/mcs/; revision=144921
2009-10-27 23:42:55 +00:00
Jonathan Pryor d102504df8 * CultureInfo.cs: Re-add GetCultures() to the MonoTouch profile.
svn path=/trunk/mcs/; revision=144148
2009-10-14 20:41:43 +00:00
Sebastien Pouliot b25e21c353 2009-10-14 Sebastien Pouliot <[email protected]>
* CultureInfo.cs: Refactor to reduce unsafe methods/scope.


svn path=/trunk/mcs/; revision=144106
2009-10-14 15:13:48 +00:00
Sebastien Pouliot 58407b336c 2009-10-07 Sebastien Pouliot <[email protected]>
* CompareInfo.cs: Don't allow MONO_DISABLE_MANAGED_COLLATION
	override for Moonlight and move all icalls together so they
	can be #if-ed out.


svn path=/trunk/mcs/; revision=143648
2009-10-07 13:40:12 +00:00
Sebastien Pouliot 9c2b650909 2009-09-23 Sebastien Pouliot <[email protected]>
* Calendar.cs: Don't expose AlgorithmType property in NET_2_1
	* CultureInfo.cs: Don't expose CultureTypes in NET_2_1
	* NumberFormatInfo.cs: Don't expose NativeDigits in NET_2_1
	* GregorianCalendar.cs, HebrewCalendar.cs, HijriCalendar.cs,
	JapaneseCalendar.cs, KoreanCalendar.cs, TaiwanCalendar.cs,
	ThaiBuddhistCalendar.cs, UmAlQuraCalendar.cs: Don't expose 
	AlgorithmType property in NET_2_1


svn path=/trunk/mcs/; revision=142480
2009-09-23 12:46:33 +00:00
Miguel de Icaza 31f9ff7de5 2009-07-26 Miguel de Icaza <[email protected]>
* Calendar.cs: Do not add internal abstract methods to the
	Calendar class, it prevents derived classes from existing. 

svn path=/trunk/mcs/; revision=138695
2009-07-26 17:44:33 +00:00
Atsushi Eno f37f07036a 2009-05-21 Atsushi Enomoto <[email protected]>
* CultureInfo.cs : it seems that zh-Hant and zh-Hans are introduced
	  as almost alias  of zh-CHS/zh-CHT in vista and some new windows.
	  Add hacky support for them.

	* CultureInfoTest.cs : test zh-Hant.


svn path=/trunk/mcs/; revision=134499
2009-05-21 02:20:16 +00:00
Atsushi Eno 28ac67adbc 2009-01-07 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : Fixed bug #462957. With empty target string it
	  should always return 0.

	* CompareInfoTest.cs : added test for #462957.


svn path=/trunk/mcs/; revision=122602
2009-01-07 02:43:34 +00:00
Atsushi Eno e0b4cf8ede 2008-08-14 Atsushi Enomoto <[email protected]>
* CultureInfo.cs : applied patch by Robert Jordan,
          fixed bug #402128. Create uninitialized parent culture
          when required.

        * CultureInfoTest.cs : added test for bug #402128.


svn path=/trunk/mcs/; revision=110466
2008-08-14 08:45:14 +00:00
Marek Safar fd836b86ab 2008-07-28 Marek Safar <[email protected]>
* GregorianCalendar.cs: Delay DateTime .cctor invocation.


svn path=/trunk/mcs/; revision=108983
2008-07-28 10:44:57 +00:00
Andreas N db48a3744a 2008-07-03 Andreas Nahr <[email protected]>
* TextInfo.cs: Fix exceptions
	* StringInfo.cs
	* SortKey.cs:
	* RegionInfo.cs:
	* NumberFormatInfo.cs:
	* CultureInfo.cs:
	* CompareInfo.cs:
	* CharUnicodeInfo.cs: Fix parameter names

svn path=/trunk/mcs/; revision=107189
2008-07-03 20:50:47 +00:00
Andreas N ab00882b70 2008-07-03 Andreas Nahr <[email protected]>
* UmAlQuraCalendar.cs:
	* ThaiBuddhistCalendar.cs
	* TaiwanCalendar.cs:
	* PersianCalendar.cs:
	* KoreanCalendar.cs:
	* JulianCalendar.cs:
	* JapaneseCalendar.cs:
	* HijriCalendar.cs:
	* HebrewCalendar.cs:
	* GregorianCalendar.cs:
	* EastAsianLunisolarCalendar.cs:
	* Calendar.cs: Fix parameter names

svn path=/trunk/mcs/; revision=107184
2008-07-03 20:21:00 +00:00
Zoltan Varga 18eb3c8a37 2008-06-28 Zoltan Varga <[email protected]>
* CompareInfo.cs: Add a cache of SimpleCollator objects.

svn path=/trunk/mcs/; revision=106850
2008-06-29 02:01:27 +00:00
Eyal Alalouf 18ea3b386d Redesign System/NumberFormatter to improve primitive numeric types ToString performance.
svn path=/trunk/mcs/; revision=92798
2008-01-13 14:44:17 +00:00
Zoltan Varga c3e7e8af5f 2008-01-06 Zoltan Varga <[email protected]>
* CultureInfo.cs: Add a 'cached_serialized_form' field.

svn path=/trunk/mcs/; revision=92334
2008-01-06 11:03:52 +00:00
Zoltan Varga 490c283c1f 2008-01-06 Zoltan Varga <[email protected]>
* CultureInfo.cs NumberFormatInfo.cs DateTimeFormatInfo.cs TextInfo.cs: Make
	sure the components of a read-only culture object are read-only as well.

svn path=/trunk/mcs/; revision=92326
2008-01-06 01:27:44 +00:00
Gert Driesen 456092fa14 * Environment.cs: Bump corlib version.
* CultureInfo.cs: Added internal CreateCulture method, which is used
by the runtime to creating CultureInfo instances for AssemblyName.
* AssemblyNameTest.cs: Improved culture test to cover bug #347174.
* Descriptors/mscorlib.xml: Preserve all for CultureInfo to prevent
linker from removing CreateCulture method that is only used by the
runtime.

svn path=/trunk/mcs/; revision=91978
2007-12-28 08:23:03 +00:00
Atsushi Eno b6832ca5d7 2007-11-21 Atsushi Enomoto <[email protected]>
* NumberFormatInfo.cs :
	  NativeDigits and DigitSubstitution are [ComVisible(false)].


svn path=/trunk/mcs/; revision=90063
2007-11-21 06:52:27 +00:00
Atsushi Eno fec737547e 2007-09-10 Atsushi Enomoto <[email protected]>
* DateTimeFormatInfo.cs : implemented SetAllDateTimePatterns().


svn path=/trunk/mcs/; revision=85553
2007-09-10 10:08:51 +00:00
Atsushi Eno 1eddb5e5f3 2007-09-10 Atsushi Enomoto <[email protected]>
* NumberFormatInfo.cs : added NativeDigits and DigitSubstitution.


svn path=/trunk/mcs/; revision=85547
2007-09-10 07:27:55 +00:00
Marek Habersack 3596509740 2007-09-06 Marek Habersack <[email protected]>
* DateTimeFormatInfo.cs: minimal implementation of
            AbbreviatedMonthGenitiveNames, MonthGenitiveNames and
            NativeCalendar name properties.

svn path=/trunk/mcs/; revision=85423
2007-09-06 15:09:07 +00:00
Zoltan Varga 5e505b6bfa 2007-08-24 Zoltan Varga <[email protected]>
* CalendricalCalculations.cs: Fix a warning.

svn path=/trunk/mcs/; revision=84823
2007-08-24 21:23:41 +00:00
Atsushi Eno d33e17636c 2007-07-17 Atsushi Enomoto <[email protected]>
* CalendricalCalculations.cs, JulianCalendar.cs :
	  true fix for bug #81783. GetMonths() should consider month part
	  going beyond 12.

	* CalendarTest.cs : true test for bug #81783 (overflown month in
	  AddMonths().)


svn path=/trunk/mcs/; revision=82072
2007-07-17 02:34:27 +00:00
Atsushi Eno f2017d8231 2007-07-10 Atsushi Enomoto <[email protected]>
* UmAlQuraCalendar.cs : forgot to implement it.


svn path=/trunk/mcs/; revision=81693
2007-07-10 10:05:58 +00:00
Atsushi Eno 8a50d92ad4 2007-07-10 Atsushi Enomoto <[email protected]>
* HijriCalendar.cs ThaiBuddhistCalendar.cs HebrewCalendar.cs
	  GregorianCalendar.cs KoreanCalendar.cs JulianCalendar.cs :
	  implemented ToFourDigitYear(), actually base implementation mostly
	  works as is.

	* CalendarTest.cs : enabled ToFourDigitYear() test from 5 years ago.
	  and added some more ToFourDigitYear() tests.


svn path=/trunk/mcs/; revision=81688
2007-07-10 07:01:38 +00:00
Atsushi Eno e36931b194 2007-07-09 Atsushi Enomoto <[email protected]>
* CultureInfo.cs : 1.x build fix.


svn path=/trunk/mcs/; revision=81634
2007-07-09 12:40:54 +00:00
Atsushi Eno d8d7a6f368 2007-07-09 Atsushi Enomoto <[email protected]>
* CultureInfo.cs : implemented GetConsoleFallbackUICulture and
	  CultureTypes (it is awful indeed). Fix ComVisibles.
	  implemented InstalledUICulture, as what matches the best I think is
	  the one for BootstrapCultureID.


svn path=/trunk/mcs/; revision=81630
2007-07-09 11:32:33 +00:00
Atsushi Eno 758d164eac 2007-07-09 Atsushi Enomoto <[email protected]>
* CultureInfo.cs : another hack, KeyboardLayoutId.


svn path=/trunk/mcs/; revision=81627
2007-07-09 10:50:26 +00:00
Atsushi Eno 8575360dab 2007-07-09 Atsushi Enomoto <[email protected]>
* CultureInfo.cs :
	  hacked IetfLanguageTag and GetCultureInfoByIetfLanguageTag().


svn path=/trunk/mcs/; revision=81626
2007-07-09 10:31:56 +00:00
Atsushi Eno b37c03e3ca 2007-07-09 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : Name.
	* PersianCalendar.cs : missing members.
	* NumberFormatInfo.cs HijriCalendar.cs CultureInfo.cs TextInfo.cs
	  HebrewCalendar.cs ThaiBuddhistCalendar.cs GregorianCalendar.cs
	  KoreanCalendar.cs JulianCalendar.cs TaiwanCalendar.cs
	  JapaneseCalendar.cs DaylightTime.cs EastAsianLunisolarCalendar.cs
	  RegionInfo.cs TextElementEnumerator.cs : ComVisible cleanup.


svn path=/trunk/mcs/; revision=81625
2007-07-09 10:10:35 +00:00
Atsushi Eno 50bd3712c1 2007-07-09 Atsushi Enomoto <[email protected]>
* TextInfo.cs : ICloneable.
	* GregorianCalendarTypes.cs CompareOptions.cs CultureTypes.cs
	  CalendarWeekRule.cs UnicodeCategory.cs : [Serializable].
	* ThaiBuddhistCalendar.cs GregorianCalendar.cs KoreanCalendar.cs
	  TaiwanCalendar.cs JapaneseCalendar.cs :
	  GetWeekOfYear() (base could be simply used). Removed unused code.


svn path=/trunk/mcs/; revision=81623
2007-07-09 09:36:24 +00:00
Atsushi Eno a87721a7ce 2007-07-02 Atsushi Enomoto <[email protected]>
* UmAlQuraCalendar.cs
	  EastAsianLunisolarCalendar.cs
	  ChineseLunisolarCalendar.cs
	  TaiwanLunisolarCalendar.cs
	  JapaneseLunisolarCalendar.cs
	  KoreanLunisolarCalendar.cs : new 2.0 calendars.
	* Calendar.cs
	  HijriCalendar.cs HebrewCalendar.cs ThaiBuddhistCalendar.cs
	  GregorianCalendar.cs KoreanCalendar.cs JulianCalendar.cs
	  TaiwanCalendar.cs JapaneseCalendar.cs PersianCalendar.cs :
	  added GetLeapMonth().
	* CalendricalCalculations.cs : added some lunisolar calendar stuff.
	  mostly stubs.

	* EastAsianLunisolarCalendarTest.cs : new test, totally not-working.
	* CalendarTest.cs : added couple of 2.0 tests. Some are not working.

	* corlib.dll.sources : added couple of new 2.0 calendars.
	* corlib_test.dll.sources : added EastAsianLunisolarCalendarTest.cs.


svn path=/trunk/mcs/; revision=81162
2007-07-02 08:33:31 +00:00
Gert Driesen e80c7764f2 * DirectoryTest.cs: Restore original CurrentCulture on teardown.
* FileSystemInfoTest.cs: Restore original CurrentCulture on teardown.
Removed stray tabs. Code formatting.
* FileTest.cs: Restore original CurrentCulture on teardown. Removed
stray tabs. Changes spaces to tabs.
* ThreadTest.cs: Added tests for bug #81930. 
* CultureInfoTest.cs: Added exception tests when invoking NumberFormat  
or DateTimeFormat on a neutral culture. Added tests for bug #81930.
No longer derive from deprecated Assertion class. Added tests for
GetCultureInfo (2.0).
* ArrayTest.cs: Added test for bug #81941.
* ByteTest.cs: Restore original CurrentCulture in teardown.
* DecimalFormatterTest.cs: Restore original CurrentCulture in teardown.
Code formatting.
* DecimalTest.cs: Code formatting.
* DoubleFormatterTest.cs: Test relies on specific culture, so set it
up here. This worked before since the CurrentCulture was set in another
TestFixture, and the original one was not restored.
* FloatingPointFormatterTest.cs: Same.
* NumberFormatterTest.cs: Same. Removed stray tabs and fixes code
formatting.
* SingleFormatterTest.cs: Restore original culture on teardown. Code
formatting.
* SingleTest.cs: Same.
* StringComparerTest.cs: Restore original culture on teardown.

svn path=/trunk/mcs/; revision=80626
2007-06-24 14:20:09 +00:00
Rolf Bjarne Kvinge 529ec2dda1 In .:
2007-05-31  Rolf Bjarne Kvinge  <[email protected]>

	* corlib_test.dll.sources : added DateTimeFormatInfoTest.cs.

In Test/System.Globalization:
2007-05-31  Rolf Bjarne Kvinge  <[email protected]>

	* DateTimeFormatInfo.cs: Added EraName.

In System.Globalization:
2007-05-31  Rolf Bjarne Kvinge  <[email protected]>

	* GregorianCalendar.cs: Change era names from C.E./Common Era 
	to AD/A.D.
	* DateTimeFormatInfo.cs: GetEra: search the abbreviated era names
	as well for the era, and return the era, not the index of the era 
	in the array.


svn path=/trunk/mcs/; revision=78435
2007-06-01 17:00:02 +00:00
Atsushi Eno d7e3c98820 2007-06-01 Atsushi Enomoto <[email protected]>
* Calendar.cs DateTimeFormatInfo.cs : 2.0 API fixes.
	* CalendricalCalculations.cs : fixed AddMonth() and AddYears() to
	  consider that the max days in the target month (for AddYears()
	  leap year month could matter). Fixed bug #81783.

	* CalendarTest.cs : test for bug #81783 and AddYears() for leap year
	  (similar issue).


svn path=/trunk/mcs/; revision=78429
2007-06-01 16:40:20 +00:00
Atsushi Eno 050407c02e 2007-05-25 Atsushi Enomoto <[email protected]>
* IdnMapping.cs : new 2.0 class.

	* IdnMappingTest.cs : new test.

	* corlib.dll.sources : added MissingSatelliteAssemblyException.cs
	  and IdnMapping.cs. Removed obsolete 2.0 NotCancelableException.cs.
	* corlib_test.dll.sources : added IdnMappingTest.cs.


svn path=/trunk/mcs/; revision=77944
2007-05-25 13:24:10 +00:00
Atsushi Eno 29fccd5693 2007-05-17 Atsushi Enomoto <[email protected]>
* DateTime.cs : added support for 'K'.

	* DateTimeFormatInfo.cs : added roundtrip pattern (only in 2.0).

	* DateTimeTest.cs : test for 'o' and 'K'.


svn path=/trunk/mcs/; revision=77579
2007-05-17 16:47:59 +00:00
Atsushi Eno b184bcaab7 2007-05-15 Atsushi Enomoto <[email protected]>
* RegionInfo.cs, CultureInfo.cs : in 2.0 RegionInfo could be created
	  from locale name. To support that, retrieve CultureInfo from name
	  and use its Territory name if exists.
	  RegionInfo.Equals() still uses lcid, but hash code is based on
	  region ID. Added GeoId, which represents unique region ID (which
	  is returned in 1.x GetHashCode()).

	* RegionInfoTest.cs : new tests.

	* corlib_test.dll.sources : added RegionInfoTest.cs.


svn path=/trunk/mcs/; revision=77408
2007-05-15 14:09:27 +00:00
Alp Toker 5e2b237fb8 2007-04-17 Alp Toker <[email protected]>
* DateTimeFormatInfo.cs: Provide set accessor for MonthNames.


svn path=/trunk/mcs/; revision=75799
2007-04-17 00:59:26 +00:00
Marek Safar 9423fb6ccc 2007-04-16 Marek Safar <[email protected]>
* PersianCalendar: Removed twoDigitYearMax field.

svn path=/trunk/mcs/; revision=75760
2007-04-16 13:05:17 +00:00
Marek Safar 9335d4bfcd 2007-03-25 Marek Safar <[email protected]>
* GregorianCalendar.cs, HebrewCalendar.cs, JapaneseCalendar.cs,
	HijriCalendar.cs, JapaneseCalendar.cs, JulianCalendar.cs,
	KoreanCalendar.cs, TaiwanCalendar.cs, ThaiBuddhistCalendar.cs:
	Removed twoDigitYearMax field.

svn path=/trunk/mcs/; revision=74958
2007-03-25 13:14:18 +00:00