1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/rdoc] Support iso-strict format in git-log

https://github.com/ruby/rdoc/commit/2a6c22da63
This commit is contained in:
Nobuyoshi Nakada 2021-01-24 16:20:34 +09:00
parent 7fe22152fc
commit 19e6d27126
2 changed files with 14 additions and 3 deletions

View file

@ -118,11 +118,11 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
def parse_date(date)
case date
when /\A\s*(\d+)-(\d+)-(\d+)(?: (\d+):(\d+):(\d+) *([-+]\d\d)(\d\d))?\b/
when /\A\s*(\d+)-(\d+)-(\d+)(?:[ T](\d+):(\d+):(\d+) *([-+]\d\d):?(\d\d))?\b/
Time.new($1, $2, $3, $4, $5, $6, ("#{$7}:#{$8}" if $7))
when /\A\s*\w{3}, +(\d+) (\w{3}) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d)(\d\d))\b/
when /\A\s*\w{3}, +(\d+) (\w{3}) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d):?(\d\d))\b/
Time.new($3, $2, $1, $4, $5, $6, ("#{$7}:#{$8}" if $7))
when /\A\s*\w{3} (\w{3}) +(\d+) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d)(\d\d))\b/
when /\A\s*\w{3} (\w{3}) +(\d+) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d):?(\d\d))\b/
Time.new($3, $1, $2, $4, $5, $6, ("#{$7}:#{$8}" if $7))
when /\A\s*\w{3} (\w{3}) +(\d+) (\d+):(\d+):(\d+) (\d+)\b/
Time.new($6, $1, $2, $3, $4, $5)

View file

@ -343,6 +343,12 @@ Date: Sat, 23 Jan 2021 06:01:39 +0900
* 2021-01-23 [ci skip]
commit\ a3efbda7128ef20b55505b32d1608ea48f80af4a
Author: git <svn-admin@ruby-lang.org>
Date: 2021-01-22T02:49:39+09:00
* 2021-01-22 [ci skip]
commit\ 709bed2afaee50e2ce803f87bf1ee8291bea41e3
Author: git <svn-admin@ruby-lang.org>
Date: 2021-01-21 01:03:52 +0900
@ -394,6 +400,11 @@ ChangeLog
log_entry(nil, 'db7d0b89f6eca66cc7eb',
'git', 'svn-admin@ruby-lang.org', 'Sat, 23 Jan 2021 06:01:39 +0900',
[list(:BULLET, item(nil, para('2021-01-23 [ci skip]')))]),
head(2, '2021-01-22'),
blank_line,
log_entry(nil, 'a3efbda7128ef20b5550',
'git', 'svn-admin@ruby-lang.org', '2021-01-22T02:49:39+09:00',
[list(:BULLET, item(nil, para('2021-01-22 [ci skip]')))]),
head(2, '2021-01-21'),
blank_line,
log_entry(nil, '709bed2afaee50e2ce80',