Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/qml/core_ext/to_qml.rb

Instance Method Summary collapse

Instance Method Details

#to_qmlObject



59
60
61
62
63
# File 'lib/qml/core_ext/to_qml.rb', line 59

def to_qml
  QML::JSUtil.classes['Date'].new(year, month, day, hour, min, sec, nsec / 1000000).tap do |date|
    date.setTime((to_r * 1000).floor)
  end
end