1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
tadf 2011-06-30 12:17:52 +00:00
parent f74f0e4567
commit 1a876fb61e
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu Jun 30 21:16:04 2011 Tadayoshi Funaba <tadf@dotrb.org>
* ext/date/date_core.c (m_ajd): refers a constant.
Thu Jun 30 20:54:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/io/console/io-console.gemspec: spin-off gem for 1.9.2.

View file

@ -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);