mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/date/date_core.c: avoided using timev.
* ext/date/date_strftime.c: ditto. * ext/date/date_tmx.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
64263ddeb6
commit
23658b355c
5 changed files with 79 additions and 26 deletions
|
@ -406,19 +406,11 @@ date_strftime_with_tmx(char *s, size_t maxsize, const char *format,
|
|||
break;
|
||||
|
||||
case 's':
|
||||
{
|
||||
VALUE sec = div(tmx_timev, INT2FIX(1));
|
||||
FMTV('0', 1, "d", sec);
|
||||
}
|
||||
FMTV('0', 1, "d", tmx_secs);
|
||||
continue;
|
||||
|
||||
case 'Q':
|
||||
{
|
||||
VALUE sec = div(tmx_timev,
|
||||
rb_rational_new2(INT2FIX(1),
|
||||
INT2FIX(1000)));
|
||||
FMTV('0', 1, "d", sec);
|
||||
}
|
||||
FMTV('0', 1, "d", tmx_msecs);
|
||||
continue;
|
||||
|
||||
case 'S': /* second, 00 - 59 */
|
||||
|
@ -697,7 +689,7 @@ date_strftime_with_tmx(char *s, size_t maxsize, const char *format,
|
|||
NEEDS(precision);
|
||||
|
||||
{
|
||||
VALUE subsec = mod(tmx_timev, INT2FIX(1));
|
||||
VALUE subsec = tmx_sec_fraction;
|
||||
int ww;
|
||||
long n;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue