Sha256: 03386f8ce4723d26b05d0340a184bc4e2489bd14e0e1b3e28a6537d860b3e870
Contents?: true
Size: 860 Bytes
Versions: 5
Compression:
Stored size: 860 Bytes
Contents
require 'date' ruby_version_is "1.9.1" do describe "DateTime#strftime" do it "shows the number of fractional seconds with leading zeroes" do DateTime.civil(2000, 4, 6).strftime("%N").should == "000000000" end it "shows the number of fractional seconds with leading zeroes to two decimal places" do DateTime.civil(2000, 4, 6).strftime("%2N").should == "00" end it "shows the number of fractional milliseconds with leading zeroes" do DateTime.civil(2000, 4, 6).strftime("%3N").should == "000" end it "shows the number of fractional microseconds with leading zeroes" do DateTime.civil(2000, 4, 6).strftime("%6N").should == "000000" end it "shows the number of fractional nanoseconds with leading zeroes" do DateTime.civil(2000, 4, 6).strftime("%9N").should == "000000000" end end end
Version data entries
5 entries across 5 versions & 1 rubygems