Skip to content

Better date format/parse rdoc #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/date.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@
# The Date class includes the Comparable module, allowing
# date objects to be compared and sorted, ranges of dates
# to be created, and so forth.
#
# See the Date::parse and Date::strptime methods to parse Dates
# and Date#strftime for formatting Dates. See Time#strftime for
# details on supported formats.

class Date

include Comparable
Expand Down Expand Up @@ -1024,7 +1029,7 @@ def self.new_by_frags(elem, sg) # :nodoc:
#
# +str+ is a String holding a date representation.
# +fmt+ is the format that the date is in. See
# date/format.rb for details on supported formats.
# Time#strftime for details on supported formats.
#
# The default +str+ is '-4712-01-01', and the default
# +fmt+ is '%F', which means Year-Month-Day_of_Month.
Expand Down
1 change: 1 addition & 0 deletions lib/date/format.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def emit_au(e, w, f) # :nodoc:
private :emit, :emit_w, :emit_n, :emit_sn, :emit_z,
:emit_a, :emit_ad, :emit_au

# See Time#strftime for details on supported formats.
def strftime(fmt='%F')
fmt.gsub(/%([-_0^#]+)?(\d+)?([EO]?(?::{1,3}z|.))/m) do
f = {}
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy