summaryrefslogtreecommitdiff
path: root/ext/date/date_strftime.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-29 14:47:04 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-29 14:47:04 +0000
commit23658b355c1c62771945cfa86e098ba8dd618779 (patch)
tree5f996bbb4f88675e72195fe674c4527a9149340d /ext/date/date_strftime.c
parent64263ddeb6b925866bc4ad2d5c74300af178b896 (diff)
* 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
Diffstat (limited to 'ext/date/date_strftime.c')
-rw-r--r--ext/date/date_strftime.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/ext/date/date_strftime.c b/ext/date/date_strftime.c
index 5781d3b795..02ad9a47ae 100644
--- a/ext/date/date_strftime.c
+++ b/ext/date/date_strftime.c
@@ -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;