From 82f15d7db53b7995d9071b03c4fc322960286c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Mon, 18 Jun 2018 10:16:12 +0200 Subject: [PATCH 1/2] Remove :nodoc: from Time::Format --- src/time/format/custom/yaml_date.cr | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/time/format/custom/yaml_date.cr b/src/time/format/custom/yaml_date.cr index c8d93ec1dd63..45763a01b22c 100644 --- a/src/time/format/custom/yaml_date.cr +++ b/src/time/format/custom/yaml_date.cr @@ -1,16 +1,15 @@ -# :nodoc: struct Time::Format + # Even though the standard library has Time parsers given a *fixed* format, + # the format in YAML, http://yaml.org/type/timestamp.html, + # can consist of just the date part, and following it any number of spaces, + # or 't', or 'T' can follow, with many optional components. So, we implement + # this in a more efficient way to avoid parsing the same string with many + # possible formats (there's also no way to specify any number of spaces + # with Time::Format, or an "or" like in a Regex). + # + # As an additional note, Ruby's Psych YAML parser also implements a + # custom time parser, probably for this same reason. module YAML_DATE - # Even though the standard library has Time parsers given a *fixed* format, - # the format in YAML, http://yaml.org/type/timestamp.html, - # can consist of just the date part, and following it any number of spaces, - # or 't', or 'T' can follow, with many optional components. So, we implement - # this in a more efficient way to avoid parsing the same string with many - # possible formats (there's also no way to specify any number of spaces - # with Time::Format, or an "or" like in a Regex). - # - # As an additional note, Ruby's Psych YAML parser also implements a - # custom time parser, probably for this same reason. # Parses a string into a `Time`. def self.parse?(string) : Time? From 4d771a8d565cd38966d8b59d5ea91d1d66311efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Mon, 18 Jun 2018 11:26:21 +0200 Subject: [PATCH 2/2] fixup! Remove :nodoc: from Time::Format --- src/time/format/custom/yaml_date.cr | 1 - 1 file changed, 1 deletion(-) diff --git a/src/time/format/custom/yaml_date.cr b/src/time/format/custom/yaml_date.cr index 45763a01b22c..9ef4808a7a1d 100644 --- a/src/time/format/custom/yaml_date.cr +++ b/src/time/format/custom/yaml_date.cr @@ -10,7 +10,6 @@ struct Time::Format # As an additional note, Ruby's Psych YAML parser also implements a # custom time parser, probably for this same reason. module YAML_DATE - # Parses a string into a `Time`. def self.parse?(string) : Time? parser = Parser.new(string)