[MacRuby] #537: Missing Time#strftime formatter: "%P"
#537: Missing Time#strftime formatter: "%P" -------------------------------+-------------------------------------------- Reporter: bburky@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -------------------------------+-------------------------------------------- I use the command line [http://sup.rubyforge.org/ sup] email program which is written in ruby. While I don't run it under MacRuby, I was checking an issue which came up on the mailing list about the "%P" formatter for strftime and tested it in MacRuby too. The "%P" should output either "am" or "pm" in lower case. Apparently most (all?) 1.8.7 rubys on OS X, don't support the "%P" formatting, which is not required. Most linux 1.8.7 rubys do support it though. MacRuby also does not support it. However it is required for 1.9. The ruby docs for Time list it for example: http://ruby-doc.org/core-1.9/classes/Time.html#M000314 Here's an example: {{{ $ macruby --version MacRuby version 0.5 (ruby 1.9.0) [universal-darwin10.0, x86_64] $ macruby -e 'puts Time.now().strftime("%l:%M%P")' 11:25P }}} That should output "11:25pm" I didn't check any of the other format strings. -- Ticket URL: <http://www.macruby.org/trac/ticket/537> MacRuby <http://macruby.org/>
#537: Missing Time#strftime formatter: "%P" -------------------------------+-------------------------------------------- Reporter: bburky@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -------------------------------+-------------------------------------------- Comment(by conradwt@…): In Ruby 1.8.x, %P isn't an option for strftime's method and one would use %p which would produce '10:49PM'. The strftime method's %P option is part of the Ruby 1.9 spec and I have verified that it doesn't exist in `MacRuby version 0.5 (ruby 1.9.0) [universal-darwin10.0, x86_64]`. -- Ticket URL: <http://www.macruby.org/trac/ticket/537#comment:1> MacRuby <http://macruby.org/>
#537: Missing Time#strftime formatter: "%P" -------------------------------+-------------------------------------------- Reporter: bburky@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -------------------------------+-------------------------------------------- Comment(by martinlagardette@…): Laurent, what's our take on this? Right now we're using the system's `strftime` that does not implement %P. If we really want to support %P, we may have to use the one in Ruby 1.9 -- Ticket URL: <http://www.macruby.org/trac/ticket/537#comment:2> MacRuby <http://macruby.org/>
#537: Missing Time#strftime formatter: "%P" -------------------------------+-------------------------------------------- Reporter: bburky@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -------------------------------+-------------------------------------------- Comment(by lsansonetti@…): Maybe this will be done as part of #608. -- Ticket URL: <http://www.macruby.org/trac/ticket/537#comment:3> MacRuby <http://macruby.org/>
#537: Missing Time#strftime formatter: "%P" -------------------------------+-------------------------------------------- Reporter: bburky@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -------------------------------+-------------------------------------------- Comment(by danielcavanagh@…): haha. consider me signed up -- Ticket URL: <http://www.macruby.org/trac/ticket/537#comment:4> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby