Commit Graph
160 Commits
Author SHA1 Message Date
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
Chris Toshok 3fe56d68fb 2007-01-25 Chris Toshok <[email protected]>
* Calendar.cs, HijriCalendar.cs, ThaiBuddhistCalendar.cs,
	HebrewCalendar.cs, GregorianCalendar.cs, KoreanCalendar.cs,
	JulianCalendar.cs, PersianCalendar.cs:

	more serialization fixes.  the M_TwoDigitYearMax field we use
	appears to be called twoDigitYearMax in MS.NET.  rename it (and
	fix all the Calendar subclasses to use this naming).  Likewise
	with is_readonly (MS calls it m_isReadOnly).

	Also, the m_currentEraValue field I had originally placed in
	GregorianCalendar appears to be in Calendar (as running
	nunit-2.2.8-2.0 shows.)

	In GregorianCalendar, rename the M_CalendarType field to m_type
	and remove the extra field I added.
	
	The previous fix got nunit 2.4-2.0 running.  This change gets
	versions 2.2.8 and 2.4 of nunit running against both 1.1 and 2.0
	profiles.


svn path=/trunk/mcs/; revision=71706
2007-01-25 19:44:15 +00:00
Chris Toshok e0a3893721 2006-01-24 Chris Toshok <[email protected]>
[ these fix nunit built with MS .net 2.0, running on mono.  nunit
	apparently stores all manner of things in its resources ]
	
	* NumberFormatInfo.cs: add unused nativeDigits and
	digitSubstitution fields that MS serializes.

	* DateTimeFormatInfo.cs: serialization fixes.  MS apparently
	stores (and serializes) a couple of fields as ints, but exposes
	them to programmers as Enum's.
	
	* CompareInfo.cs: add unused m_name field that MS serializes.

	* GregorianCalendar.cs: add a couple of unused fields that MS serializes.


svn path=/trunk/mcs/; revision=71620
2007-01-24 19:27:56 +00:00
Atsushi Eno c6d95c708e 2007-01-22 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : there was a test which raises assertion failure
	  if there isn't paramName for ArgumentException. Quite odd one.


svn path=/trunk/mcs/; revision=71449
2007-01-22 17:39:21 +00:00
Miguel de Icaza 7a0f1b0969 2007-01-12 Miguel de Icaza <[email protected]>
* DateTimeFormatInfo.cs: Add support for shortest day names.
	Notice that there is no support in the runtime to actually load
	this information from any place.   So they are all english values.

svn path=/trunk/mcs/; revision=70945
2007-01-13 03:52:24 +00:00
Atsushi Eno fec2a9c3ae 2007-01-07 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : GetSortKey() does not allow Ordinal and 
	  OrdinalIgnoreCase in 2.0 (shuold be also prohibited in 1.x BTW).


svn path=/trunk/mcs/; revision=70628
2007-01-08 07:54:45 +00:00
Atsushi Eno 3064a0316d 2006-12-25 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : added IndexOf() implementation for Ordinal
	  and OrdinalIgnoreCase, though Ordinal version is not used (since
	  it is slower than icall).

	* CompareInfo.cs : for OrdinalIgnoreCase, IndexOf() and LastIndexOf()
	  will use managed version (icalls for them are case sensitive).
	  Removed MonoTODOs.

	* CompareInfoTest.cs : added tests for OrdinalIgnoreCase versions
	  of IndexOf() and LastIndexOf(). Added Ordinal LastIndexOf() tests.


svn path=/trunk/mcs/; revision=70037
2006-12-25 09:45:38 +00:00
Igor Zelmanovich 8f94e29ef9 2006-12-17 Igor Zelmanovich <[email protected]>
* DateTimeFormatInfo.cs : added missing properties and methods.

svn path=/trunk/mcs/; revision=69605
2006-12-17 17:03:36 +00:00
Atsushi Eno 2c1ce21b2c 2006-12-01 Atsushi Enomoto <[email protected]>
* DateTime.cs :
	  use new internal clone-less DateTimeFormatInfo members.

	* DateTimeFormatInfo.cs : added some internal clone-less versions of
	  string[] properties and methods.


svn path=/trunk/mcs/; revision=68812
2006-12-01 06:52:54 +00:00
Atsushi Eno 6fe325aede 2006-11-27 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : fixed wrong || with && for OrdinalIgnoreCase.
	  Fixed bug #80056.

	* CompareInfoTest.cs : why there was "return" before OrdinalIgnoreCase
	  tests ...


svn path=/trunk/mcs/; revision=68492
2006-11-27 03:41:18 +00:00
Marek Safar ac2fea76da 2006-11-10 Marek Safar <[email protected]>
* CultureInfo.cs (TextInfo): Construct a culture when is
	uninitialized. An issue exposed by previous change.

svn path=/trunk/mcs/; revision=67684
2006-11-10 18:52:55 +00:00
Marek Safar 6a6ad9d1c8 2006-11-09 Marek Safar <[email protected]>
* CompareInfo.cs: Cache full UseManagedCollation value;
	* CultureInfo.cs (Parent): Add caching to avoid re-creating culture info
	  every time when the property is used.
	* TextInfo.cs: Removed unused field.

svn path=/trunk/mcs/; revision=67623
2006-11-09 18:29:51 +00:00
Miguel de Icaza b5ff3df984 2006-08-19 Miguel de Icaza <[email protected]>
* CultureInfo.cs (GetCultureInfo): implement two of the 2.0
	overloads, as the vb code depends on this.

svn path=/trunk/mcs/; revision=64060
2006-08-19 21:59:21 +00:00
Kornél Pál 2d604bc51e Converted ChangeLogs to UTF-8 and recovered incorrectly encoded characters.
svn path=/trunk/mcs/; revision=63835
2006-08-16 19:42:08 +00:00
Kornél Pál 7db8cd0a57 Added encoding deserialization support classes.
svn path=/trunk/mcs/; revision=62235
2006-07-03 19:58:11 +00:00
Zoltan Varga 00cbdc2d23 2006-06-30 Zoltan Varga <[email protected]>
* CultureInfo.cs: Add stubs for net 2.0 GetCultureInfo () methods.

svn path=/trunk/mcs/; revision=62155
2006-06-30 10:26:08 +00:00
Atsushi Eno 3b68ed659f 2006-03-21 Atsushi Enomoto <[email protected]>
* HebrewCalrndar.cs : simply use CCHebrewCalendar.last_day_of_month().
	  Patch by Yaacov Akiba Slama. Fixed bug #76252.

	* CalendarTest.cs : added test for bug #76252.


svn path=/trunk/mcs/; revision=58211
2006-03-21 01:49:24 +00:00
Atsushi Eno 5dfaa2fb4f 2006-03-20 Atsushi Enomoto <[email protected]>
* HebrewCalrndar.cs : removed commented obsolete code.


svn path=/trunk/mcs/; revision=58173
2006-03-20 06:56:57 +00:00
Atsushi Eno 0389315d70 2006-03-16 Atsushi Enomoto <[email protected]>
* TextInfo.cs : (ToUpper/ToLower) use InternalAllocateStr() and
	  pointers rather than StringBuilder.


svn path=/trunk/mcs/; revision=58089
2006-03-16 22:45:30 +00:00
Peter Dennis Bartok 0c2f1dff71 2006-03-07 Peter Dennis Bartok <[email protected]>
* Environment.cs: Bumped corlib version to 48 (due to r57532)

2006-03-07  Peter Dennis Bartok  <[email protected]>

	* DateTimeFormatInfo.cs: Restored original field order to allow
	  some automatic locale fu to happen (mono unmanaged code relies 
	  on the field order to fill out DateTimeFormatInfo)


svn path=/trunk/mcs/; revision=57679
2006-03-07 23:29:59 +00:00
Peter Dennis Bartok eb1c36e677 2006-03-02 Peter Dennis Bartok <[email protected]>
* DateTimeFormatInfo.cs: Switched (where possible) our internal
	  field names to match MS names. Added fields that MS has and we
	  don't. Fixes serialization issues with MS.
	* CultureInfo.cs, Calendar.cs, TextInfo.cs, 
	  GregorianCalenda.cs: Hiding internal attributes from serialization


svn path=/trunk/mcs/; revision=57532
2006-03-03 05:47:10 +00:00
Atsushi Eno 3dfb0495d5 2006-01-25 Atsushi Enomoto <[email protected]>
* CultureInfo.cs : Clone() attempted to clone number and date time
	  formats, thus failed. Fixed bug #77347.

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


svn path=/trunk/mcs/; revision=56032
2006-01-25 07:23:45 +00:00
Sebastien Pouliot 00688a2d4c 2005-12-08 Sebastien Pouliot <[email protected]>
* DaylightTime.cs: Fixed serialization to be compatible with MS FX.
	Pre-requisite to fix bug #76094.


svn path=/trunk/mcs/; revision=54144
2005-12-09 01:26:08 +00:00