michael@0: /* michael@0: * Copyright (c) 1999 michael@0: * Silicon Graphics Computer Systems, Inc. michael@0: * michael@0: * Copyright (c) 1999 michael@0: * Boris Fomitchev michael@0: * michael@0: * This material is provided "as is", with absolutely no warranty expressed michael@0: * or implied. Any use is at your own risk. michael@0: * michael@0: * Permission to use or copy this software for any purpose is hereby granted michael@0: * without fee, provided the above notices are retained on all copies. michael@0: * Permission to modify the code and to distribute modified code is granted, michael@0: * provided the above notices are retained, and a notice that the code was michael@0: * modified is included with the above copyright notice. michael@0: * michael@0: */ michael@0: michael@0: #include "stlport_prefix.h" michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: #include "c_locale.h" michael@0: #include "acquire_release.h" michael@0: michael@0: _STLP_BEGIN_NAMESPACE michael@0: michael@0: _STLP_MOVE_TO_PRIV_NAMESPACE michael@0: michael@0: // default "C" values for month and day names michael@0: michael@0: const char default_dayname[][14] = { michael@0: "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", michael@0: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", michael@0: "Friday", "Saturday"}; michael@0: michael@0: const char default_monthname[][24] = { michael@0: "Jan", "Feb", "Mar", "Apr", "May", "Jun", michael@0: "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", michael@0: "January", "February", "March", "April", "May", "June", michael@0: "July", "August", "September", "October", "November", "December"}; michael@0: michael@0: #ifndef _STLP_NO_WCHAR_T michael@0: const wchar_t default_wdayname[][14] = { michael@0: L"Sun", L"Mon", L"Tue", L"Wed", L"Thu", L"Fri", L"Sat", michael@0: L"Sunday", L"Monday", L"Tuesday", L"Wednesday", L"Thursday", michael@0: L"Friday", L"Saturday"}; michael@0: michael@0: const wchar_t default_wmonthname[][24] = { michael@0: L"Jan", L"Feb", L"Mar", L"Apr", L"May", L"Jun", michael@0: L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec", michael@0: L"January", L"February", L"March", L"April", L"May", L"June", michael@0: L"July", L"August", L"September", L"October", L"November", L"December"}; michael@0: #endif michael@0: michael@0: #if defined (__BORLANDC__) michael@0: _Time_Info time_init::_M_timeinfo; michael@0: # ifndef _STLP_NO_WCHAR_T michael@0: _WTime_Info time_init::_M_timeinfo; michael@0: # endif michael@0: #endif michael@0: michael@0: // _Init_time_info: initialize table with michael@0: // "C" values (note these are not defined in the C standard, so this michael@0: // is somewhat arbitrary). michael@0: michael@0: static void _Init_timeinfo_base(_Time_Info_Base& table) { michael@0: table._M_time_format = "%H:%M:%S"; michael@0: table._M_date_format = "%m/%d/%y"; michael@0: table._M_date_time_format = "%m/%d/%y"; michael@0: } michael@0: michael@0: static void _Init_timeinfo(_Time_Info& table) { michael@0: int i; michael@0: for (i = 0; i < 14; ++i) michael@0: table._M_dayname[i] = default_dayname[i]; michael@0: for (i = 0; i < 24; ++i) michael@0: table._M_monthname[i] = default_monthname[i]; michael@0: table._M_am_pm[0] = "AM"; michael@0: table._M_am_pm[1] = "PM"; michael@0: _Init_timeinfo_base(table); michael@0: } michael@0: michael@0: #ifndef _STLP_NO_WCHAR_T michael@0: static void _Init_timeinfo(_WTime_Info& table) { michael@0: int i; michael@0: for (i = 0; i < 14; ++i) michael@0: table._M_dayname[i] = default_wdayname[i]; michael@0: for (i = 0; i < 24; ++i) michael@0: table._M_monthname[i] = default_wmonthname[i]; michael@0: table._M_am_pm[0] = L"AM"; michael@0: table._M_am_pm[1] = L"PM"; michael@0: _Init_timeinfo_base(table); michael@0: } michael@0: #endif michael@0: michael@0: static void _Init_timeinfo_base(_Time_Info_Base& table, _Locale_time * time) { michael@0: table._M_time_format = _Locale_t_fmt(time); michael@0: if ( table._M_time_format == "%T" ) { michael@0: table._M_time_format = "%H:%M:%S"; michael@0: } else if ( table._M_time_format == "%r" ) { michael@0: table._M_time_format = "%I:%M:%S %p"; michael@0: } else if ( table._M_time_format == "%R" ) { michael@0: table._M_time_format = "%H:%M"; michael@0: } michael@0: table._M_date_format = _Locale_d_fmt(time); michael@0: table._M_date_time_format = _Locale_d_t_fmt(time); michael@0: table._M_long_date_format = _Locale_long_d_fmt(time); michael@0: table._M_long_date_time_format = _Locale_long_d_t_fmt(time); michael@0: } michael@0: michael@0: static void _Init_timeinfo(_Time_Info& table, _Locale_time * time) { michael@0: int i; michael@0: for (i = 0; i < 7; ++i) michael@0: table._M_dayname[i] = _Locale_abbrev_dayofweek(time, i); michael@0: for (i = 0; i < 7; ++i) michael@0: table._M_dayname[i+7] = _Locale_full_dayofweek(time, i); michael@0: for (i = 0; i < 12; ++i) michael@0: table._M_monthname[i] = _Locale_abbrev_monthname(time, i); michael@0: for (i = 0; i < 12; ++i) michael@0: table._M_monthname[i+12] = _Locale_full_monthname(time, i); michael@0: table._M_am_pm[0] = _Locale_am_str(time); michael@0: table._M_am_pm[1] = _Locale_pm_str(time); michael@0: _Init_timeinfo_base(table, time); michael@0: } michael@0: michael@0: #ifndef _STLP_NO_WCHAR_T michael@0: static void _Init_timeinfo(_WTime_Info& table, _Locale_time * time) { michael@0: wchar_t buf[128]; michael@0: int i; michael@0: for (i = 0; i < 7; ++i) michael@0: table._M_dayname[i] = _WLocale_abbrev_dayofweek(time, i, _STLP_ARRAY_AND_SIZE(buf)); michael@0: for (i = 0; i < 7; ++i) michael@0: table._M_dayname[i+7] = _WLocale_full_dayofweek(time, i, _STLP_ARRAY_AND_SIZE(buf)); michael@0: for (i = 0; i < 12; ++i) michael@0: table._M_monthname[i] = _WLocale_abbrev_monthname(time, i, _STLP_ARRAY_AND_SIZE(buf)); michael@0: for (i = 0; i < 12; ++i) michael@0: table._M_monthname[i+12] = _WLocale_full_monthname(time, i, _STLP_ARRAY_AND_SIZE(buf)); michael@0: table._M_am_pm[0] = _WLocale_am_str(time, _STLP_ARRAY_AND_SIZE(buf)); michael@0: table._M_am_pm[1] = _WLocale_pm_str(time, _STLP_ARRAY_AND_SIZE(buf)); michael@0: _Init_timeinfo_base(table, time); michael@0: } michael@0: #endif michael@0: michael@0: template michael@0: void __subformat(_STLP_BASIC_IOSTRING(_Ch) &buf, const ctype<_Ch>& ct, michael@0: const string& format, const _TimeInfo& table, const tm* t) { michael@0: const char * cp = format.data(); michael@0: const char * cp_end = cp + format.size(); michael@0: while (cp != cp_end) { michael@0: if (*cp == '%') { michael@0: char mod = 0; michael@0: ++cp; michael@0: if (*cp == '#') { michael@0: mod = *cp; ++cp; michael@0: } michael@0: __write_formatted_timeT(buf, ct, *cp++, mod, table, t); michael@0: } else michael@0: buf.append(1, *cp++); michael@0: } michael@0: } michael@0: michael@0: static void __append(__iostring &buf, const string& name) michael@0: { buf.append(name.data(), name.data() + name.size()); } michael@0: michael@0: static void __append(__iowstring &buf, const wstring& name) michael@0: { buf.append(name.data(), name.data() + name.size()); } michael@0: michael@0: static void __append(__iostring &buf, char *first, char *last, const ctype& /* ct */) michael@0: { buf.append(first, last); } michael@0: michael@0: static void __append(__iowstring &buf, char *first, char *last, const ctype& ct) { michael@0: wchar_t _wbuf[64]; michael@0: ct.widen(first, last, _wbuf); michael@0: buf.append(_wbuf, _wbuf + (last - first)); michael@0: } michael@0: michael@0: #if defined (__GNUC__) michael@0: /* The number of days from the first day of the first ISO week of this michael@0: year to the year day YDAY with week day WDAY. ISO weeks start on michael@0: Monday; the first ISO week has the year's first Thursday. YDAY may michael@0: be as small as YDAY_MINIMUM. */ michael@0: # define __ISO_WEEK_START_WDAY 1 /* Monday */ michael@0: # define __ISO_WEEK1_WDAY 4 /* Thursday */ michael@0: # define __YDAY_MINIMUM (-366) michael@0: # define __TM_YEAR_BASE 1900 michael@0: static int michael@0: __iso_week_days(int yday, int wday) { michael@0: /* Add enough to the first operand of % to make it nonnegative. */ michael@0: int big_enough_multiple_of_7 = (-__YDAY_MINIMUM / 7 + 2) * 7; michael@0: return (yday michael@0: - (yday - wday + __ISO_WEEK1_WDAY + big_enough_multiple_of_7) % 7 michael@0: + __ISO_WEEK1_WDAY - __ISO_WEEK_START_WDAY); michael@0: } michael@0: michael@0: # define __is_leap(year)\ michael@0: ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) michael@0: michael@0: #endif michael@0: michael@0: #define __hour12(hour) \ michael@0: (((hour) % 12 == 0) ? (12) : (hour) % 12) michael@0: michael@0: #if !defined (_STLP_USE_SAFE_STRING_FUNCTIONS) michael@0: # define _STLP_SPRINTF sprintf michael@0: #else michael@0: # define _STLP_SPRINTF sprintf_s michael@0: #endif michael@0: michael@0: template michael@0: void _STLP_CALL __write_formatted_timeT(_STLP_BASIC_IOSTRING(_Ch) &buf, michael@0: const ctype<_Ch>& ct, michael@0: char format, char modifier, michael@0: const _TimeInfo& table, const tm* t) { michael@0: char _buf[64]; michael@0: char *_bend; michael@0: michael@0: switch (format) { michael@0: case 'a': michael@0: __append(buf, table._M_dayname[t->tm_wday]); michael@0: break; michael@0: michael@0: case 'A': michael@0: __append(buf, table._M_dayname[t->tm_wday + 7]); michael@0: break; michael@0: michael@0: case 'b': michael@0: __append(buf, table._M_monthname[t->tm_mon]); michael@0: break; michael@0: michael@0: case 'B': michael@0: __append(buf, table._M_monthname[t->tm_mon + 12]); michael@0: break; michael@0: michael@0: case 'c': michael@0: __subformat(buf, ct, (modifier != '#') ? table._M_date_time_format michael@0: : table._M_long_date_time_format, table, t); michael@0: break; michael@0: michael@0: case 'd': michael@0: _STLP_SPRINTF(_buf, (modifier != '#') ? "%.2ld" : "%ld", (long)t->tm_mday); michael@0: __append(buf, _buf, ((long)t->tm_mday < 10L && modifier == '#') ? _buf + 1 : _buf + 2, ct); michael@0: break; michael@0: michael@0: case 'e': michael@0: _STLP_SPRINTF(_buf, "%2ld", (long)t->tm_mday); michael@0: __append(buf, _buf, _buf + 2, ct); michael@0: break; michael@0: michael@0: case 'H': michael@0: _STLP_SPRINTF(_buf, (modifier != '#') ? "%.2ld" : "%ld", (long)t->tm_hour); michael@0: __append(buf, _buf, ((long)t->tm_hour < 10L && modifier == '#') ? _buf + 1 : _buf + 2, ct); michael@0: break; michael@0: michael@0: case 'I': michael@0: _STLP_SPRINTF(_buf, (modifier != '#') ? "%.2ld" : "%ld", (long)__hour12(t->tm_hour)); michael@0: __append(buf, _buf, ((long)__hour12(t->tm_hour) < 10L && modifier == '#') ? _buf + 1 : _buf + 2, ct); michael@0: break; michael@0: michael@0: case 'j': michael@0: _bend = __write_integer(_buf, 0, (long)((long)t->tm_yday + 1)); michael@0: __append(buf, _buf, _bend, ct); michael@0: break; michael@0: michael@0: case 'm': michael@0: _STLP_SPRINTF(_buf, (modifier != '#') ? "%.2ld" : "%ld", (long)t->tm_mon + 1); michael@0: __append(buf, _buf, ((long)(t->tm_mon + 1) < 10L && modifier == '#') ? _buf + 1 : _buf + 2, ct); michael@0: break; michael@0: michael@0: case 'M': michael@0: _STLP_SPRINTF(_buf, (modifier != '#') ? "%.2ld" : "%ld", (long)t->tm_min); michael@0: __append(buf, _buf, ((long)t->tm_min < 10L && modifier == '#') ? _buf + 1 : _buf + 2, ct); michael@0: break; michael@0: michael@0: case 'p': michael@0: __append(buf, table._M_am_pm[t->tm_hour / 12]); michael@0: break; michael@0: michael@0: case 'S': // pad with zeros michael@0: _STLP_SPRINTF(_buf, (modifier != '#') ? "%.2ld" : "%ld", (long)t->tm_sec); michael@0: __append(buf, _buf, ((long)t->tm_sec < 10L && modifier == '#') ? _buf + 1 : _buf + 2, ct); michael@0: break; michael@0: michael@0: case 'U': michael@0: _bend = __write_integer(_buf, 0, long((t->tm_yday - t->tm_wday + 7) / 7)); michael@0: __append(buf, _buf, _bend, ct); michael@0: break; michael@0: michael@0: case 'w': michael@0: _bend = __write_integer(_buf, 0, (long)t->tm_wday); michael@0: __append(buf, _buf, _bend, ct); michael@0: break; michael@0: michael@0: case 'W': michael@0: _bend = __write_integer(_buf, 0, michael@0: (long)(t->tm_wday == 0 ? (t->tm_yday + 1) / 7 : michael@0: (t->tm_yday + 8 - t->tm_wday) / 7)); michael@0: __append(buf, _buf, _bend, ct); michael@0: break; michael@0: michael@0: case'x': michael@0: __subformat(buf, ct, (modifier != '#') ? table._M_date_format michael@0: : table._M_long_date_format, table, t); michael@0: break; michael@0: michael@0: case 'X': michael@0: __subformat(buf, ct, table._M_time_format, table, t); michael@0: break; michael@0: michael@0: case 'y': michael@0: _bend = __write_integer(_buf, 0, (long)((long)(t->tm_year + 1900) % 100)); michael@0: __append(buf, _buf, _bend, ct); michael@0: break; michael@0: michael@0: case 'Y': michael@0: _bend = __write_integer(_buf, 0, (long)((long)t->tm_year + 1900)); michael@0: __append(buf, _buf, _bend, ct); michael@0: break; michael@0: michael@0: case '%': michael@0: buf.append(1, ct.widen('%')); michael@0: break; michael@0: michael@0: #if defined (__GNUC__) michael@0: // fbp : at least on SUN michael@0: # if defined (_STLP_UNIX) && !defined (__linux__) michael@0: # define __USE_BSD 1 michael@0: # endif michael@0: michael@0: /********************************************* michael@0: * JGS, handle various extensions * michael@0: *********************************************/ michael@0: michael@0: case 'h': /* POSIX.2 extension */ michael@0: // same as 'b', abbrev month name michael@0: __append(buf, table._M_monthname[t->tm_mon]); michael@0: break; michael@0: case 'C': /* POSIX.2 extension */ michael@0: // same as 'd', the day michael@0: _STLP_SPRINTF(_buf, "%2ld", (long)t->tm_mday); michael@0: __append(buf, _buf, _buf + 2, ct); michael@0: break; michael@0: michael@0: case 'D': /* POSIX.2 extension */ michael@0: // same as 'x' michael@0: __subformat(buf, ct, table._M_date_format, table, t); michael@0: break; michael@0: michael@0: case 'k': /* GNU extension */ michael@0: _STLP_SPRINTF(_buf, "%2ld", (long)t->tm_hour); michael@0: __append(buf, _buf, _buf + 2, ct); michael@0: break; michael@0: michael@0: case 'l': /* GNU extension */ michael@0: _STLP_SPRINTF(_buf, "%2ld", (long)t->tm_hour % 12); michael@0: __append(buf, _buf, _buf + 2, ct); michael@0: break; michael@0: michael@0: case 'n': /* POSIX.2 extension */ michael@0: buf.append(1, ct.widen('\n')); michael@0: break; michael@0: michael@0: case 'R': /* GNU extension */ michael@0: __subformat(buf, ct, "%H:%M", table, t); michael@0: break; michael@0: michael@0: case 'r': /* POSIX.2 extension */ michael@0: __subformat(buf, ct, "%I:%M:%S %p", table, t); michael@0: break; michael@0: michael@0: case 'T': /* POSIX.2 extension. */ michael@0: __subformat(buf, ct, "%H:%M:%S", table, t); michael@0: break; michael@0: michael@0: case 't': /* POSIX.2 extension. */ michael@0: buf.append(1, ct.widen('\t')); michael@0: michael@0: case 'u': /* POSIX.2 extension. */ michael@0: _bend = __write_integer(_buf, 0, long((t->tm_wday - 1 + 7)) % 7 + 1); michael@0: __append(buf, _buf, _bend, ct); michael@0: break; michael@0: michael@0: case 's': { michael@0: time_t __t = mktime(__CONST_CAST(tm*, t)); michael@0: _bend = __write_integer(_buf, 0, (long)__t ); michael@0: __append(buf, _buf, _bend, ct); michael@0: break; michael@0: } michael@0: case 'g': /* GNU extension */ michael@0: case 'G': { michael@0: int year = t->tm_year + __TM_YEAR_BASE; michael@0: int days = __iso_week_days (t->tm_yday, t->tm_wday); michael@0: if (days < 0) { michael@0: /* This ISO week belongs to the previous year. */ michael@0: year--; michael@0: days = __iso_week_days (t->tm_yday + (365 + __is_leap (year)), t->tm_wday); michael@0: } michael@0: else { michael@0: int d = __iso_week_days (t->tm_yday - (365 + __is_leap (year)), t->tm_wday); michael@0: if (0 <= d) { michael@0: /* This ISO week belongs to the next year. */ michael@0: ++year; michael@0: days = d; michael@0: } michael@0: } michael@0: long val; michael@0: switch (format) { michael@0: case 'g': michael@0: val = (long)(year % 100 + 100) % 100; michael@0: break; michael@0: case 'G': michael@0: val = (long)year; michael@0: break; michael@0: default: michael@0: val = (long)days / 7 + 1; michael@0: break; michael@0: } michael@0: _bend = __write_integer(_buf, 0, val); michael@0: __append(buf, _buf, _bend, ct); michael@0: break; michael@0: } michael@0: michael@0: # if defined (_STLP_USE_GLIBC) michael@0: case 'z': /* GNU extension. */ michael@0: if (t->tm_isdst < 0) michael@0: break; michael@0: { michael@0: int diff; michael@0: # if defined (__USE_BSD) || defined (__BEOS__) michael@0: diff = t->tm_gmtoff; michael@0: # else michael@0: diff = t->__tm_gmtoff; michael@0: # endif michael@0: if (diff < 0) { michael@0: buf.append(1, ct.widen('-')); michael@0: diff = -diff; michael@0: } else michael@0: buf.append(1, ct.widen('+')); michael@0: diff /= 60; michael@0: _STLP_SPRINTF(_buf, "%.4d", (diff / 60) * 100 + diff % 60); michael@0: __append(buf, _buf, _buf + 4, ct); michael@0: break; michael@0: } michael@0: # endif /* __GLIBC__ */ michael@0: #endif /* __GNUC__ */ michael@0: michael@0: default: michael@0: break; michael@0: } michael@0: } michael@0: michael@0: void _STLP_CALL __write_formatted_time(__iostring &buf, const ctype& ct, michael@0: char format, char modifier, michael@0: const _Time_Info& table, const tm* t) michael@0: { __write_formatted_timeT(buf, ct, format, modifier, table, t); } michael@0: michael@0: void _STLP_CALL __write_formatted_time(__iowstring &buf, const ctype& ct, michael@0: char format, char modifier, michael@0: const _WTime_Info& table, const tm* t) michael@0: { __write_formatted_timeT(buf, ct, format, modifier, table, t); } michael@0: michael@0: static time_base::dateorder __get_date_order(_Locale_time* time) { michael@0: const char * fmt = _Locale_d_fmt(time); michael@0: char first, second, third; michael@0: michael@0: while (*fmt != 0 && *fmt != '%') ++fmt; michael@0: if (*fmt == 0) michael@0: return time_base::no_order; michael@0: first = *++fmt; michael@0: while (*fmt != 0 && *fmt != '%') ++fmt; michael@0: if (*fmt == 0) michael@0: return time_base::no_order; michael@0: second = *++fmt; michael@0: while (*fmt != 0 && *fmt != '%') ++fmt; michael@0: if (*fmt == 0) michael@0: return time_base::no_order; michael@0: third = *++fmt; michael@0: michael@0: switch (first) { michael@0: case 'd': michael@0: return (second == 'm' && third == 'y') ? time_base::dmy michael@0: : time_base::no_order; michael@0: case 'm': michael@0: return (second == 'd' && third == 'y') ? time_base::mdy michael@0: : time_base::no_order; michael@0: case 'y': michael@0: switch (second) { michael@0: case 'd': michael@0: return third == 'm' ? time_base::ydm : time_base::no_order; michael@0: case 'm': michael@0: return third == 'd' ? time_base::ymd : time_base::no_order; michael@0: default: michael@0: return time_base::no_order; michael@0: } michael@0: default: michael@0: return time_base::no_order; michael@0: } michael@0: } michael@0: michael@0: time_init::time_init() michael@0: : _M_dateorder(time_base::no_order) michael@0: { _Init_timeinfo(_M_timeinfo); } michael@0: michael@0: time_init::time_init(const char* __name) { michael@0: if (!__name) michael@0: locale::_M_throw_on_null_name(); michael@0: michael@0: int __err_code; michael@0: char buf[_Locale_MAX_SIMPLE_NAME]; michael@0: _Locale_time *__time = __acquire_time(__name, buf, 0, &__err_code); michael@0: if (!__time) michael@0: locale::_M_throw_on_creation_failure(__err_code, __name, "time"); michael@0: michael@0: _Init_timeinfo(this->_M_timeinfo, __time); michael@0: _M_dateorder = __get_date_order(__time); michael@0: __release_time(__time); michael@0: } michael@0: michael@0: time_init::time_init(_Locale_time *__time) { michael@0: _Init_timeinfo(this->_M_timeinfo, __time); michael@0: _M_dateorder = __get_date_order(__time); michael@0: } michael@0: michael@0: #ifndef _STLP_NO_WCHAR_T michael@0: time_init::time_init() michael@0: : _M_dateorder(time_base::no_order) michael@0: { _Init_timeinfo(_M_timeinfo); } michael@0: michael@0: time_init::time_init(const char* __name) { michael@0: if (!__name) michael@0: locale::_M_throw_on_null_name(); michael@0: michael@0: int __err_code; michael@0: char buf[_Locale_MAX_SIMPLE_NAME]; michael@0: _Locale_time *__time = __acquire_time(__name, buf, 0, &__err_code); michael@0: if (!__time) michael@0: locale::_M_throw_on_creation_failure(__err_code, __name, "time"); michael@0: michael@0: _Init_timeinfo(this->_M_timeinfo, __time); michael@0: _M_dateorder = __get_date_order(__time); michael@0: __release_time(__time); michael@0: } michael@0: michael@0: time_init::time_init(_Locale_time *__time) { michael@0: _Init_timeinfo(this->_M_timeinfo, __time); michael@0: _M_dateorder = __get_date_order(__time); michael@0: } michael@0: #endif michael@0: michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: michael@0: #if !defined (_STLP_NO_FORCE_INSTANTIATE) michael@0: template class time_get > >; michael@0: template class time_put > >; michael@0: michael@0: # ifndef _STLP_NO_WCHAR_T michael@0: template class time_get > >; michael@0: template class time_put > >; michael@0: # endif michael@0: michael@0: #endif michael@0: michael@0: _STLP_END_NAMESPACE