Class: Time
- Inherits:
-
Object
- Object
- Time
- Defined in:
- lib/compact_time.rb
Instance Method Summary collapse
Instance Method Details
#compact ⇒ Object
11 12 13 |
# File 'lib/compact_time.rb', line 11 def compact "%02d %s%02d %s%02d%02d".freeze % compact_array end |
#compact_array ⇒ Object
5 6 7 |
# File 'lib/compact_time.rb', line 5 def compact_array [cpt_year % 100, cpt_season, cpt_week, cpt_day, hour, min] end |
#full ⇒ Object
14 15 16 |
# File 'lib/compact_time.rb', line 14 def full "%d %s%02d %s%02d%02d%s %02d %06d".freeze % full_array end |
#full_array ⇒ Object
8 9 10 |
# File 'lib/compact_time.rb', line 8 def full_array [cpt_year, cpt_season, cpt_week, cpt_day, hour, min, cpt_offset, sec, usec] end |
#till_now ⇒ Object
4 |
# File 'lib/compact_time.rb', line 4 def till_now; self.class.now - self end |