Class: Qt::Date
Instance Method Summary collapse
-
#initialize(*args) ⇒ Date
constructor
A new instance of Date.
- #inspect ⇒ Object
- #pretty_print(pp) ⇒ Object
- #to_date ⇒ Object
Constructor Details
#initialize(*args) ⇒ Date
Returns a new instance of Date.
667 668 669 670 671 672 673 |
# File 'lib/Qt/qtruby4.rb', line 667 def initialize(*args) if args.size == 1 && args[0].class.name == "Date" return super(args[0].year, args[0].month, args[0].day) else return super(*args) end end |
Instance Method Details
#inspect ⇒ Object
675 676 677 678 |
# File 'lib/Qt/qtruby4.rb', line 675 def inspect str = super str.sub(/>$/, " %s>" % toString) end |
#pretty_print(pp) ⇒ Object
680 681 682 683 |
# File 'lib/Qt/qtruby4.rb', line 680 def pretty_print(pp) str = to_s pp.text str.sub(/>$/, " %s>" % toString) end |
#to_date ⇒ Object
685 686 687 |
# File 'lib/Qt/qtruby4.rb', line 685 def to_date ::Date.new! to_julian_day end |