Project

General

Profile

Actions

Bug #5906

closed

CSV converter option fails in case of :date_time

Added by steenslag (siep korteling) about 12 years ago. Updated over 11 years ago.

Status:
Rejected
Target version:
-
ruby -v:
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
Backport:
[ruby-core:42171]

Description

The built-in converters of CSV with the name :date_time does not convert dates, nor does the :any converter


Files

Updated by naruse (Yui NARUSE) about 12 years ago

  • Category set to lib
  • Status changed from Open to Assigned
  • Assignee set to JEG2 (James Gray)

Updated by JEG2 (James Gray) over 11 years ago

  • Status changed from Assigned to Rejected
  • % Done changed from 0 to 100

The converters do work, just not on the date format you gave them.

Your format is ambiguous. Should we treat it as month-day-year as it would be in the U.S. or day-month-year as it would be in the U.K.? Because we can't know, we don't support that format by default. The year-month-day format is supported, plus month name, day year. These are chosen because they are unambiguous.

If you need to support a different format, just add your own converter. You will know how your dates look, so it's easy for you to parse it correctly.

I hope that makes sense.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0