mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* strftime.c (rb_strftime): "%^P" should convert to upper case.
[ruby-dev:37180] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
15b183c218
commit
a689e57283
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Nov 25 10:35:29 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* strftime.c (rb_strftime): "%^P" should convert to upper case.
|
||||
[ruby-dev:37180]
|
||||
|
||||
Tue Nov 25 07:51:18 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* strftime.c (FMT): use "%0d" formatter for zero padding, not "%.d".
|
||||
|
|
|
@ -404,7 +404,7 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct tm *timept
|
|||
case 'p': /* AM or PM based on 12-hour clock */
|
||||
case 'P': /* am or pm based on 12-hour clock */
|
||||
if ((*format == 'p' && (flags & BIT_OF(CHCASE))) ||
|
||||
(*format == 'P' && !(flags & BIT_OF(CHCASE)))) {
|
||||
(*format == 'P' && !(flags & (BIT_OF(CHCASE)|BIT_OF(UPPER))))) {
|
||||
flags &= ~(BIT_OF(UPPER)|BIT_OF(CHCASE));
|
||||
flags |= BIT_OF(LOWER);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue