summaryrefslogtreecommitdiff
path: root/lib/parsedate.rb
diff options
context:
space:
mode:
author(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-24 07:13:56 +0000
committer(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-24 07:13:56 +0000
commit1d2c192d35dcaa0483eebd891fddef0e972c8a59 (patch)
treec33a3db7cc3c455b958f645083f0f9efbbfb165b /lib/parsedate.rb
parent99020d6e50702eb371111d73280eb80b4b29ba5b (diff)
This commit was manufactured by cvs2svn to create tag
'v1_6_4_preview3'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_6_4_preview3@1446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/parsedate.rb')
-rw-r--r--lib/parsedate.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/parsedate.rb b/lib/parsedate.rb
index eee114acb2..7fc75cf0c2 100644
--- a/lib/parsedate.rb
+++ b/lib/parsedate.rb
@@ -1,5 +1,5 @@
-# parsedate.rb: Written by Tadayoshi Funaba 2000
-# $Id: parsedate.rb,v 1.2 2000-04-01 12:16:56+09 tadf Exp $
+# parsedate3.rb: Written by Tadayoshi Funaba 2000, 2001
+# $Id: parsedate3.rb,v 1.3 2001-01-18 12:09:47+09 tadf Exp $
module ParseDate
@@ -46,7 +46,12 @@ module ParseDate
hour = $1.to_i
min = $2.to_i
sec = $3.to_i if $3
- hour += 12 if $4 and $4.downcase == 'p'
+ if $4
+ hour %= 12
+ if $4.downcase == 'p'
+ hour += 12
+ end
+ end
zone = $5
end