Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,7 +105,7 @@ def initialize opts={} | |
:date_or_time => Regexp.new(client("[hmsYMD]", 'UTF-8')), | ||
:datetime => Regexp.new(client("([YMD].*[HS])|([HS].*[YMD])", 'UTF-8')), | ||
:time => Regexp.new(client("[hms]", 'UTF-8')), | ||
:number => Regexp.new(client("[\#]", 'UTF-8')) | ||
:number => Regexp.new(client("([\#]|0+)", 'UTF-8')) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
kunashir
Contributor
|
||
} | ||
|
||
# Temp code to prevent merged formats in non-merged cells. | ||
|
1 comment
on commit 3d6a2d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
send me a pull request please and make sure the tests pass.
This change made Spreadsheet return numbers from some cells that actually contain dates (and broke my code written on top of the gem). The reason behind this is that these cells have number format like
[$-409]m/d/yy\ h:mm\ AM/PM;@
or[$-F800]dddd\,\ mmmm\ dd\,\ yyyy
. I.e. regexp0+
makes Spreadsheet erroneously interpret them as numbers. The values inside square brackets are locale codes. @kunashir, I appreciate your effort, but it would be naive to think that0+
would tell numbers from other formats so easily (check out the first link below).All in all, guys, I need your opinion on how to solve this.