зеркало из https://github.com/github/ruby.git
* 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:
Родитель
15b183c218
Коммит
a689e57283
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче