From: Eric Sherman <hyperbolist@gmail.com>
To: sup-devel <sup-devel@rubyforge.org>
Subject: [sup-devel] [PATCH] fixed am/pm in thread-list-mode for ruby1.8
Date: Thu, 31 Dec 2009 09:48:25 -0500 [thread overview]
Message-ID: <1262270484-sup-8396@changeling.local> (raw)
Here's a patch that gives the proper am/pm display for ruby1.8 if that's
what's running.
---
lib/sup/util.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/sup/util.rb b/lib/sup/util.rb
index f99e1c1..1a2a447 100644
--- a/lib/sup/util.rb
+++ b/lib/sup/util.rb
@@ -486,9 +486,9 @@ class Time
strftime "%b %e"
else
if is_the_same_day? from
- strftime("%l:%M%P")
+ (RUBY_VERSION =~ /^1.8/) ? strftime("%l:%M%p").downcase : strftime("%l:%M%P")
elsif is_the_day_before? from
- "Yest." + nearest_hour.strftime("%l%P")
+ "Yest." + ((RUBY_VERSION =~ /^1.8/) ? nearest_hour.strftime("%l%p").downcase : nearest_hour.strftime("%l%P"))
else
strftime "%b %e"
end
--
1.6.5.7
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
next reply other threads:[~2009-12-31 14:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-31 14:48 Eric Sherman [this message]
2009-12-31 19:53 ` William Morgan
2009-12-31 20:03 ` Eric Sherman
2009-12-31 20:14 ` William Morgan
2009-12-31 21:03 ` Eric Sherman
2009-12-31 21:27 ` Benoît PIERRE
2009-12-31 22:10 ` Eric Sherman
2010-01-01 15:13 ` William Morgan
2010-01-02 5:59 ` Blake Burkhart
2010-01-02 6:13 ` Eric Sherman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1262270484-sup-8396@changeling.local \
--to=hyperbolist@gmail.com \
--cc=sup-devel@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox