summaryrefslogtreecommitdiff
path: root/libc/misc/time/strftime.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-03-15 16:20:00 +0000
committerEric Andersen <andersen@codepoet.org>2002-03-15 16:20:00 +0000
commit103cbe2418eb707a44fd4e2ebf6292f7993a258c (patch)
tree95753b3f6119f8068b007fa7f5f9e94939c85aba /libc/misc/time/strftime.c
parentc2ac6db844679d707e0e93854416f764dee10fd9 (diff)
Add strptime, and commonize some locale strings
-Erik
Diffstat (limited to 'libc/misc/time/strftime.c')
-rw-r--r--libc/misc/time/strftime.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/libc/misc/time/strftime.c b/libc/misc/time/strftime.c
index 4dd3d7dd0..e1f0a4c1f 100644
--- a/libc/misc/time/strftime.c
+++ b/libc/misc/time/strftime.c
@@ -85,16 +85,8 @@ static unsigned int week(const struct tm *const tp , int starting_day , int max_
}
#ifndef _NL_CURRENT
-static char const weekday_name[][10] =
- {
- "Sunday", "Monday", "Tuesday", "Wednesday",
- "Thursday", "Friday", "Saturday"
- };
-static char const month_name[][10] =
- {
- "January", "February", "March", "April", "May", "June",
- "July", "August", "September", "October", "November", "December"
- };
+extern char const __weekday_name[][10];
+extern char const __month_name[][10];
#endif
/* Write information from TP into S according to the format
@@ -117,8 +109,8 @@ size_t strftime( char *s , size_t maxsize , const char *format , register const
size_t am_len = strlen(a_month);
size_t ap_len = strlen (ampm);
#else
- const char *const f_wkday = weekday_name[tp->tm_wday];
- const char *const f_month = month_name[tp->tm_mon];
+ const char *const f_wkday = __weekday_name[tp->tm_wday];
+ const char *const f_month = __month_name[tp->tm_mon];
const char *const a_wkday = f_wkday;
const char *const a_month = f_month;
const char *const ampm = "AMPM" + 2 * (hour12 > 11);