End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Date#jisx0301
jisx0301 → string
ext/date/date_core.c
View on GitHub ↗
static VALUE
d_lite_jisx0301(VALUE self)
{
char fmtbuf[JISX0301_DATE_SIZE];
const char *fmt;
get_d1(self);
fmt = jisx0301_date_format(fmtbuf, sizeof(fmtbuf),
m_real_local_jd(dat),
m_real_year(dat));
return strftimev(fmt, self, set_tmx);
}
Returns a string representation of the date in self in JIS X 0301 format.
Example
Date.new(2001, 2, 3).jisx0301 # => "H13.02.03"