Commit 9b7e9add authored by KOBAYASHI Shuji's avatar KOBAYASHI Shuji

Pad leading zero to month and day in `MRUBY_RELEASE_DATE`

For Ruby compatibility.
parent c274e1ae
......@@ -77,7 +77,21 @@ MRB_BEGIN_DECL
/*
* Release date as a string.
*/
#define MRUBY_RELEASE_DATE MRB_STRINGIZE(MRUBY_RELEASE_YEAR) "-" MRB_STRINGIZE(MRUBY_RELEASE_MONTH) "-" MRB_STRINGIZE(MRUBY_RELEASE_DAY)
#define MRUBY_RELEASE_DATE \
MRUBY_RELEASE_YEAR_STR "-" \
MRUBY_RELEASE_MONTH_STR "-" \
MRUBY_RELEASE_DAY_STR
#define MRUBY_RELEASE_YEAR_STR MRB_STRINGIZE(MRUBY_RELEASE_YEAR)
#if MRUBY_RELEASE_MONTH < 10
#define MRUBY_RELEASE_MONTH_STR "0" MRB_STRINGIZE(MRUBY_RELEASE_MONTH)
#else
#define MRUBY_RELEASE_MONTH_STR MRB_STRINGIZE(MRUBY_RELEASE_MONTH)
#endif
#if MRUBY_RELEASE_DAY < 10
#define MRUBY_RELEASE_DAY_STR "0" MRB_STRINGIZE(MRUBY_RELEASE_DAY)
#else
#define MRUBY_RELEASE_DAY_STR MRB_STRINGIZE(MRUBY_RELEASE_DAY)
#endif
/*
* The year mruby was first created.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment