OLD | NEW |
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 /* This Source Code Form is subject to the terms of the Mozilla Public | 2 /* This Source Code Form is subject to the terms of the Mozilla Public |
3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | 5 |
6 /* | 6 /* |
7 *---------------------------------------------------------------------- | 7 *---------------------------------------------------------------------- |
8 * | 8 * |
9 * prtime.h -- | 9 * prtime.h -- |
10 * | 10 * |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 * a PRTime (microseconds after "1-Jan-1970 00:00:00 GMT"). | 239 * a PRTime (microseconds after "1-Jan-1970 00:00:00 GMT"). |
240 * It returns PR_SUCCESS on success, and PR_FAILURE | 240 * It returns PR_SUCCESS on success, and PR_FAILURE |
241 * if the time/date string can't be parsed. | 241 * if the time/date string can't be parsed. |
242 */ | 242 */ |
243 | 243 |
244 NSPR_API(PRStatus) PR_ParseTimeString ( | 244 NSPR_API(PRStatus) PR_ParseTimeString ( |
245 const char *string, | 245 const char *string, |
246 PRBool default_to_gmt, | 246 PRBool default_to_gmt, |
247 PRTime *result); | 247 PRTime *result); |
248 | 248 |
249 /* | |
250 * FIXME: should we also have a formatting function, such as asctime, ctime, | |
251 * and strftime in standard C library? But this would involve | |
252 * internationalization issues. Might want to provide a US English version. | |
253 */ | |
254 | |
255 /**********************************************************************/ | |
256 /*********************** OLD COMPATIBILITYFUNCTIONS *******************/ | |
257 /**********************************************************************/ | |
258 #ifndef NO_NSPR_10_SUPPORT | |
259 | |
260 /* Format a time value into a buffer. Same semantics as strftime() */ | 249 /* Format a time value into a buffer. Same semantics as strftime() */ |
261 NSPR_API(PRUint32) PR_FormatTime(char *buf, int buflen, const char *fmt, | 250 NSPR_API(PRUint32) PR_FormatTime(char *buf, int buflen, const char *fmt, |
262 const PRExplodedTime *tm); | 251 const PRExplodedTime *tm); |
263 | 252 |
264 /* Format a time value into a buffer. Time is always in US English format, regar
dless | 253 /* Format a time value into a buffer. Time is always in US English format, regar
dless |
265 * of locale setting. | 254 * of locale setting. |
266 */ | 255 */ |
267 NSPR_API(PRUint32) | 256 NSPR_API(PRUint32) |
268 PR_FormatTimeUSEnglish( char* buf, PRUint32 bufSize, | 257 PR_FormatTimeUSEnglish( char* buf, PRUint32 bufSize, |
269 const char* format, const PRExplodedTime* tm ); | 258 const char* format, const PRExplodedTime* tm ); |
270 | 259 |
271 #endif /* NO_NSPR_10_SUPPORT */ | |
272 | |
273 PR_END_EXTERN_C | 260 PR_END_EXTERN_C |
274 | 261 |
275 #endif /* prtime_h___ */ | 262 #endif /* prtime_h___ */ |
OLD | NEW |