diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-03-21 14:52:12 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-03-21 14:52:12 +0000 |
| commit | 58dae109b503e9315ed56e1ce0f4ec0b2ceb4002 (patch) | |
| tree | dd847cad306377854382fb4e92721545800ed697 | |
| parent | 77b898c43a35c71c901e090609d1a9b34a7e1d41 (diff) | |
Notes
| -rw-r--r-- | lib/libc/stdtime/strftime.3 | 6 | ||||
| -rw-r--r-- | lib/libc/stdtime/strftime.c | 14 | ||||
| -rw-r--r-- | lib/libc/stdtime/strptime.c | 17 |
3 files changed, 4 insertions, 33 deletions
diff --git a/lib/libc/stdtime/strftime.3 b/lib/libc/stdtime/strftime.3 index 3f50c6b964d4..b4cb993fce33 100644 --- a/lib/libc/stdtime/strftime.3 +++ b/lib/libc/stdtime/strftime.3 @@ -110,10 +110,8 @@ The sequences are supposed to provide alternate representations. .Pp -Additionly %Ef implemented to represent short month name / day -order of the date, %EF to represent long month name / day -order -and %OB to represent alternative months names +Additionly %OB implemented +to represent alternative months names (used standalone, without day mentioned). .It Cm %e is replaced by the day of month as a decimal number (1-31); single diff --git a/lib/libc/stdtime/strftime.c b/lib/libc/stdtime/strftime.c index a4cdc86a51f8..72f67d426d61 100644 --- a/lib/libc/stdtime/strftime.c +++ b/lib/libc/stdtime/strftime.c @@ -158,20 +158,8 @@ label: case 'e': pt = _conv(t->tm_mday, "%2d", pt, ptlim); continue; - case 'f': - if (!Ealternative) - break; - pt = _fmt(*(tptr->md_order) == 'd' ? - "%e %b" : "%b %e", - t, pt, ptlim); - continue; case 'F': - if (!Ealternative) - pt = _fmt("%Y-%m-%d", t, pt, ptlim); - else - pt = _fmt(*(tptr->md_order) == 'd' ? - "%e %B" : "%B %e", - t, pt, ptlim); + pt = _fmt("%Y-%m-%d", t, pt, ptlim); continue; case 'H': pt = _conv(t->tm_hour, "%02d", pt, ptlim); diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index b39176dc12b9..09f8e18e579d 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -165,22 +165,7 @@ label: goto label; case 'F': - if (!Ealternative) - buf = _strptime(buf, "%Y-%m-%d", tm); - else - buf = _strptime(buf, - *(tptr->md_order) == 'd' ? - "%e %B" : "%B %e", tm); - if (buf == 0) - return 0; - break; - - case 'f': - if (!Ealternative) - break; - buf = _strptime(buf, - *(tptr->md_order) == 'd' ? "%e %b" : "%b %e", - tm); + buf = _strptime(buf, "%Y-%m-%d", tm); if (buf == 0) return 0; break; |
