summaryrefslogtreecommitdiff
path: root/lib/date/format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/date/format.rb')
-rw-r--r--lib/date/format.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/date/format.rb b/lib/date/format.rb
index c8bc10fbac..161cf85891 100644
--- a/lib/date/format.rb
+++ b/lib/date/format.rb
@@ -255,6 +255,7 @@ class Date
when 'j'; emit_n(yday, 3, f)
when 'k'; emit_a(hour, 2, f)
when 'L'
+ f[:p] = nil
w = f[:w] || 3
u = 10**w
emit_n((sec_fraction * u).floor, w, f)
@@ -262,6 +263,7 @@ class Date
when 'M', 'OM'; emit_n(min, 2, f)
when 'm', 'Om'; emit_n(mon, 2, f)
when 'N'
+ f[:p] = nil
w = f[:w] || 9
u = 10**w
emit_n((sec_fraction * u).floor, w, f)