Class: HxOverrides
- Inherits:
-
Object
- Object
- HxOverrides
- Defined in:
- lib/lib/hx_overrides.rb
Class Method Summary collapse
-
.date_str(date) ⇒ Object
protected - in ruby this doesn’t play well with static/inline methods.
Class Method Details
.date_str(date) ⇒ Object
protected - in ruby this doesn’t play well with static/inline methods
8 9 10 11 12 13 14 15 |
# File 'lib/lib/hx_overrides.rb', line 8 def HxOverrides.date_str(date) m = date.get_month + 1 d = date.get_date h = date.get_hours mi = date.get_minutes s = date.get_seconds _hx_str(date.get_full_year) + "-" + _hx_str((((m < 10) ? "0" + _hx_str(m) : "" + _hx_str(m)))) + "-" + _hx_str((((d < 10) ? "0" + _hx_str(d) : "" + _hx_str(d)))) + " " + _hx_str((((h < 10) ? "0" + _hx_str(h) : "" + _hx_str(h)))) + ":" + _hx_str((((mi < 10) ? "0" + _hx_str(mi) : "" + _hx_str(mi)))) + ":" + _hx_str((((s < 10) ? "0" + _hx_str(s) : "" + _hx_str(s)))) end |