aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-09-24 07:37:00 -0400
committerRalph Amissah <ralph@amissah.com>2011-09-24 07:37:00 -0400
commit8edbb1387588fadd3469a450dd00362c4455d639 (patch)
treeba8f08c4de6adde7ed564b4db1e6dad960d82b14 /lib
parentv2: remote, image source url fix (diff)
v2 v3: param, matching of date, years 1400 - 21\d\d
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/param.rb12
-rw-r--r--lib/sisu/v3/param.rb8
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/sisu/v2/param.rb b/lib/sisu/v2/param.rb
index 656490d9..60663830 100644
--- a/lib/sisu/v2/param.rb
+++ b/lib/sisu/v2/param.rb
@@ -120,9 +120,9 @@ module SiSU_Param
def all
s=nil
if @author
- s ||=((@date =~/([12][890]\d{2})/ ) \
- ? ("Copyright (C) #{$1} #{@author}") \
- : ('Copyright (C)' + @author)) #matches years 1800 through 20\d\d 2004w19
+ s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
+ ? ("Copyright (C) #{$1} #{@author}")
+ : ('Copyright (C)' + @author)) #matches years 1400 through 21\d\d
end
s
end
@@ -133,9 +133,9 @@ module SiSU_Param
def all
s=nil
if @author
- s ||=((@date =~/([12][890]\d{2})/ ) \
- ? ("Copyright (C) #{$1} #{@author}") \
- : ('Copyright (C)' + @author)) #matches years 1800 through 20\d\d 2004w19
+ s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
+ ? ("Copyright (C) #{$1} #{@author}")
+ : ('Copyright (C)' + @author)) #matches years 1400 through 21\d\d
end
s
end
diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb
index f9d7ecb0..3911f85e 100644
--- a/lib/sisu/v3/param.rb
+++ b/lib/sisu/v3/param.rb
@@ -131,9 +131,9 @@ module SiSU_Param
def all
s=nil
if @author
- s ||=((@date =~/([12][890]\d{2})/ ) \
+ s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
? ("Copyright (C) #{$1} #{@author}")
- : ('Copyright (C)' + @author)) #matches years 1800 through 20\d\d 2004w19
+ : ('Copyright (C)' + @author)) #matches years 1400 through 21\d\d
end
s
end
@@ -144,9 +144,9 @@ module SiSU_Param
def all
s=nil
if @author
- s ||=((@date =~/([12][890]\d{2})/ ) \
+ s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
? ("Copyright (C) #{$1} #{@author}")
- : ('Copyright (C)' + @author)) #matches years 1800 through 20\d\d 2004w19
+ : ('Copyright (C)' + @author)) #matches years 1400 through 21\d\d
end
s
end