diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-30 12:17:52 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-30 12:17:52 +0000 |
commit | 1a876fb61ea9c64553a80f4d4683c8b675eca054 (patch) | |
tree | 7d72c1f7b5c3b56f9367c9807ad471eaacdd0118 /ext/date | |
parent | f74f0e45678dfc34e4afc6c8c3e187fd25c9a660 (diff) |
* ext/date/date_core.c (m_ajd): refers a constant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date')
-rw-r--r-- | ext/date/date_core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/date/date_core.c b/ext/date/date_core.c index a18365eb21..66d980fcf4 100644 --- a/ext/date/date_core.c +++ b/ext/date/date_core.c @@ -1481,6 +1481,8 @@ m_fr(union DateData *x) } } +#define HALF_DAYS_IN_SECONDS (DAY_IN_SECONDS / 2) + static VALUE m_ajd(union DateData *x) { @@ -1495,7 +1497,7 @@ m_ajd(union DateData *x) r = m_real_jd(x); df = m_df(x); - df -= 43200; /* 12 hours */ + df -= HALF_DAYS_IN_SECONDS; if (df) r = f_add(r, isec_to_day(df)); sf = m_sf(x); |