Class: ODBC::TimeStamp
- Inherits:
-
Object
- Object
- ODBC::TimeStamp
- Defined in:
- lib/marjoree/odbc.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#==(pal) ⇒ Object
7 8 9 |
# File 'lib/marjoree/odbc.rb', line 7 def ==( pal ) return to_s.index( pal.to_s ) == 0 end |
#inspect ⇒ Object
27 28 29 |
# File 'lib/marjoree/odbc.rb', line 27 def inspect "#{old_to_s.split[0]} #{old_to_s.split[1]}" end |
#old_to_s ⇒ Object
5 |
# File 'lib/marjoree/odbc.rb', line 5 alias_method :old_to_s, :to_s |
#to_s ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/marjoree/odbc.rb', line 11 def to_s datetime = old_to_s date, time, fraction = datetime.split(" ") fraction_text = (fraction == '0') ? '' : ".#{fraction}" return "#{date} #{time}#{fraction_text}" end |