Module: FastYear

Defined in:
lib/fast_year/version.rb,
ext/fast_year/fast_year.c

Constant Summary collapse

VERSION =
'0.1.0'

Class Method Summary collapse

Class Method Details

.yearObject



4
5
6
7
8
9
10
11
# File 'ext/fast_year/fast_year.c', line 4

static VALUE
year()
{
  time_t t = time(NULL);
  struct tm *local = localtime(&t);

  return INT2NUM(local->tm_year + 1900);
}