Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: documentation for ParseDate: msg#00018

Subject: Re: documentation for ParseDate
On Oct 15, 2006, at 3:15 PM, Konrad Meyer wrote:
On 10/15/06, Eric Hodel <drbrain@xxxxxxxxxxxx> wrote:
On Oct 7, 2006, at 3:19 PM, Konrad Meyer wrote:

-# parsedate.rb: Written by Tadayoshi Funaba 2001, 2002
-# $Id: parsedate.rb,v 2.6 2002-05-14 07:43:18+09 tadf Exp $

Don't remove the $Id$ or the dates.  Hide them in --/++

Sorry, what do you mean by --/++?

-- stops comment inclusion in the RDoc output and ++ starts it up again.

#--
# parsedate.rb: [...]
# $Id$
#++

Will hide those two lines since they don't need to be in the output.

Second try!

@@ -2,2 +2,8 @@
 # $Id: parsedate.rb,v 2.6 2002-05-14 07:43:18+09 tadf Exp $
+#
+# = parsedate.rb: Parses dates
+#
+# Author:: Tadayoshi Funaba
+# Documentation:: Konrad Meyer
+#

Your documentation contribution will be noted in the changelog. All other ruby contributions by non-committers are documented there.

+ # ParseDate.parsedate can also take a second argument, +comp+, which + # is a boolean telling the method to compensate for Y2k dates. "92" to
+  # 1992, "06" to 2006, etc.
+  #
   def parsedate(str, comp=false)

irb(main):011:0> ParseDate.parsedate '12/31/68', true
=> [2068, 12, 31, nil, nil, nil, nil, nil]
irb(main):012:0> ParseDate.parsedate '01/01/69', true
=> [1969, 1, 1, nil, nil, nil, nil, nil]

Can you describe this too?

--
Eric Hodel - drbrain@xxxxxxxxxxxx - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com






<Prev in Thread] Current Thread [Next in Thread>