Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/flexa_lib/date_extensions.rb
Class Method Summary collapse
Class Method Details
._parse_with_us_format(date, *args) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/flexa_lib/date_extensions.rb', line 7 def _parse_with_us_format(date, *args) if date.nil? return '' end if date =~ %r{^(\d+)/(\d+)/(\d+)$} _parse_without_us_format("#{$3.length == 2 ? "20#{$3}" : $3}-#{$2}-#{$1}", *args) else _parse_without_us_format(date, *args) end end |