This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patchlet/RFC] Finish up _M_extract_via_format


Hi,

I'm finally implementing time_get::date_order (libstdc++/9635)
and noticed that _M_extract_via_format needs some work.

This patchlet, which I'm going to commit, fixes a minor issue,
another, more serious, is filed as libstdc++/12750: the 'e'
formatting code is not dealt with and unfortunately doesn't
appear to be really equivalent to 'd' (*)

It will take me some time to preliminarily fix that since
_M_extract_num it's not able to deal with spaces.

Suggestions well accepted!

Paolo.

(*) This is not an "academic" topic, since, for "is_IS" ;) it
actually happens that D_FMT is '%a %e.%b %Y'

/////////
2003-10-24  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc
	(time_get<>::_M_extract_via_format): Deal with case 'C' too,
	equivalent to 'y'.
diff -urN libstdc++-v3-orig/include/bits/locale_facets.tcc libstdc++-v3/include/bits/locale_facets.tcc
--- libstdc++-v3-orig/include/bits/locale_facets.tcc	2003-10-23 13:42:56.000000000 +0200
+++ libstdc++-v3/include/bits/locale_facets.tcc	2003-10-24 10:39:57.000000000 +0200
@@ -1691,6 +1691,7 @@
 					__times[0]);
 		  break;
 		case 'y':
+		case 'C': // C99
 		  // Two digit year. [tm_year]
 		  _M_extract_num(__beg, __end, __tm->tm_year, 0, 99, 2, 
 				 __ctype, __err);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]