Module: DateTime::Smart::SharedClassMethods

Included in:
Date::Smart, DateTime::Smart
Defined in:
lib/date_time/smart.rb

Instance Method Summary collapse

Instance Method Details

#now(sg = Date::ITALY) ⇒ Object



49
50
51
52
53
# File 'lib/date_time/smart.rb', line 49

def now(sg = Date::ITALY)
  dt = DateTime.now(sg)
  
  new!(dt.ajd, dt.offset, dt.sg)
end

#today(sg = Date::ITALY) ⇒ Object



55
56
57
58
59
# File 'lib/date_time/smart.rb', line 55

def today(sg = Date::ITALY)
  dt = Date.today(sg)

  new!(dt.ajd, dt.offset, dt.sg)
end