зеркало из https://github.com/github/ruby.git
[ruby/date] Extracted common leading pattern
https://github.com/ruby/date/commit/ec86dbbdc1
This commit is contained in:
Родитель
c19a631c99
Коммит
9f59a2bd87
|
@ -652,8 +652,10 @@ parse_time(VALUE str, VALUE hash)
|
|||
{
|
||||
static const char pat_source[] =
|
||||
"("
|
||||
"\\d+\\s*"
|
||||
"(?:"
|
||||
"\\d+\\s*:\\s*\\d+"
|
||||
"(?:"
|
||||
":\\s*\\d+"
|
||||
"(?:"
|
||||
#ifndef TIGHT_PARSER
|
||||
"\\s*:\\s*\\d+(?:[,.]\\d*)?"
|
||||
|
@ -662,14 +664,15 @@ parse_time(VALUE str, VALUE hash)
|
|||
#endif
|
||||
")?"
|
||||
"|"
|
||||
"\\d+\\s*h(?:\\s*\\d+m?(?:\\s*\\d+s?)?)?"
|
||||
"h(?:\\s*\\d+m?(?:\\s*\\d+s?)?)?"
|
||||
")"
|
||||
"(?:"
|
||||
"\\s*"
|
||||
"[ap](?:m\\b|\\.m\\.)"
|
||||
")?"
|
||||
"|"
|
||||
"\\d+\\s*[ap](?:m\\b|\\.m\\.)"
|
||||
"[ap](?:m\\b|\\.m\\.)"
|
||||
")"
|
||||
")"
|
||||
"(?:"
|
||||
"\\s*"
|
||||
|
|
Загрузка…
Ссылка в новой задаче