[#8815] Segfault in libc strlen, via rb_str_new2 — "Sean E. Russell" <ser@...>

Howdy,

12 messages 2006/09/09
[#8817] Re: Segfault in libc strlen, via rb_str_new2 — Eric Hodel <drbrain@...7.net> 2006/09/09

On Sep 8, 2006, at 10:10 PM, Sean E. Russell wrote:

[ ruby-Bugs-5752 ] Date._parse doesn't understand hour only time, e.g. 2pm

From: <noreply@...>
Date: 2006-09-13 22:40:40 UTC
List: ruby-core #8860
Bugs item #5752, was opened at 2006-09-14 10:40
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=5752&group_id=426

Category: Standard Library
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Lex Miller (lexmiller)
Assigned to: Nobody (None)
Summary: Date._parse doesn't understand hour only time, e.g. 2pm

Initial Comment:
Date._parse will ignore the time component of a string if it is specfied with hours followed by am or pm but without minutes:

In this case the time is ignored:
irb(main):004:0> Date._parse("2006/09/14 2pm")
=> {:mon=>9, :year=>2006, :mday=>14}
If minutes are specified, the time is parsed successfully:
irb(main):005:0> Date._parse("2006/09/14 2:00pm")
=> {:mon=>9, :year=>2006, :hour=>14, :min=>0, :mday=>14}

I susject that the first case should produce the same result as the second case.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=5752&group_id=426

In This Thread

Prev Next