Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #153 from tychobrailleur/time-strftime

Spec dash behaviour for padded format directives.
  • Loading branch information...
commit 6c1169fa23f487be09f2ed7994513fedc06114a3 2 parents ea047c8 + 067e12f
@dbussink dbussink authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 core/time/strftime_spec.rb
View
7 core/time/strftime_spec.rb
@@ -288,5 +288,12 @@
time = Time.local(2010,10,10,12,10,42)
time.strftime("%-m/%-d/%-y %-I:%-M %p").should == "10/10/10 12:10 PM"
end
+
+ it "supports the '-' modifier for padded format directives" do
+ time = Time.local(2010, 8, 8, 8, 10, 42)
+ time.strftime("%-e").should == "8"
+ time.strftime("%-k%p").should == "8AM"
+ time.strftime("%-l%p").should == "8AM"
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.