document.write('<div class="java5" style="font-family: monospace;"><span style="color: #808080; font-style: italic;">// Imports</span><br />');
document.write('<span style="color: #000000; font-weight: bold;">import</span> java.<span style="color: #006600;">*</span>;<br />');
document.write('<span style="color: #000000; font-weight: bold;">import</span> java.<span style="color: #006600;">awt</span>.<span style="color: #006600;">*</span>;<br />');
document.write('<span style="color: #000000; font-weight: bold;">import</span> java.<span style="color: #006600;">io</span>.<span style="color: #006600;">*</span>;<br />');
document.write('<span style="color: #000000; font-weight: bold;">import</span> java.<span style="color: #006600;">util</span>.<span style="color: #006600;">*</span>;<br />');
document.write('<span style="color: #000000; font-weight: bold;">import</span> java.<span style="color: #006600;">lang</span>.<span style="color: #006600;">*</span>;<br />');
document.write('<span style="color: #000000; font-weight: bold;">import</span> java.<span style="color: #006600;">text</span>.<span style="color: #006600;">*</span>;<br />');
document.write('<br />');
document.write('<br />');
document.write('<span style="color: #000000; font-weight: bold;">class</span> DateParse<br />');
document.write('<span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Variables</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> m_strMonths = <span style="color: #66cc66;">&#123;</span> <span style="color: #ff0000;">&quot;January&quot;</span>, <span style="color: #ff0000;">&quot;February&quot;</span>, <span style="color: #ff0000;">&quot;March&quot;</span>, <span style="color: #ff0000;">&quot;April&quot;</span>, <span style="color: #ff0000;">&quot;May&quot;</span>, <span style="color: #ff0000;">&quot;June&quot;</span>, <span style="color: #ff0000;">&quot;July&quot;</span>, <span style="color: #ff0000;">&quot;August&quot;</span>, <span style="color: #ff0000;">&quot;September&quot;</span>, <span style="color: #ff0000;">&quot;October&quot;</span>, <span style="color: #ff0000;">&quot;November&quot;</span>, <span style="color: #ff0000;">&quot;December&quot;</span> <span style="color: #66cc66;">&#125;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Constructor</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> DateParse<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Main</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">void</span> main<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"><span style="color: #aaaadd; font-weight: bold;">String</span></a> args<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span>&nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Declare variables</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DateParse dpParse = <span style="color: #000000; font-weight: bold;">new</span> DateParse<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;&nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Run</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dpParse.<span style="color: #006600;">Run</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Exit</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">exit</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Run</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> Run<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Declare variables</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/NumberFormat.html"><span style="color: #aaaadd; font-weight: bold;">NumberFormat</span></a> nfFormat = <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/NumberFormat.html"><span style="color: #aaaadd; font-weight: bold;">NumberFormat</span></a>.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/io/StreamTokenizer.html"><span style="color: #aaaadd; font-weight: bold;">StreamTokenizer</span></a> stTokens = <span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/io/StreamTokenizer.html"><span style="color: #aaaadd; font-weight: bold;">StreamTokenizer</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/io/BufferedReader.html"><span style="color: #aaaadd; font-weight: bold;">BufferedReader</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStreamReader.html"><span style="color: #aaaadd; font-weight: bold;">InputStreamReader</span></a><span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">in</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"><span style="color: #aaaadd; font-weight: bold;">String</span></a> strInput = <span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/io/BufferedReader.html"><span style="color: #aaaadd; font-weight: bold;">BufferedReader</span></a> brInput = <span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/io/BufferedReader.html"><span style="color: #aaaadd; font-weight: bold;">BufferedReader</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStreamReader.html"><span style="color: #aaaadd; font-weight: bold;">InputStreamReader</span></a><span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">in</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Setup tokenizer</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; stTokens.<span style="color: #006600;">eolIsSignificant</span><span style="color: #66cc66;">&#40;</span><span style="color: #b13366;">true</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Prompt</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">print</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Enter a date in form MM/DD/YY or MM DD, YYYY: &quot;</span><span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Try</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">try</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Get user input</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strInput = brInput.<span style="color: #006600;">readLine</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Parse</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Parse<span style="color: #66cc66;">&#40;</span>strInput<span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html"><span style="color: #aaaadd; font-weight: bold;">IOException</span></a> ioExcept<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>Error: &quot;</span> + ioExcept.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot;!<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">exit</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Handle invalid input</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> InvalidInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>Error: Invalid input.<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">exit</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;&nbsp;&nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Parse</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> Parse<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"><span style="color: #aaaadd; font-weight: bold;">String</span></a> strInput<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Declare variables</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Validate</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>strInput.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InvalidInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// See what mode we are in</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>IsNumeric<span style="color: #66cc66;">&#40;</span>strInput.<span style="color: #006600;">charAt</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #b13366;">true</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ParseNumeric<span style="color: #66cc66;">&#40;</span>strInput<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ParseString<span style="color: #66cc66;">&#40;</span>strInput<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Determines if a character is numeric</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">boolean</span> IsNumeric<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span> cChar<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Validate</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html"><span style="color: #aaaadd; font-weight: bold;">Character</span></a>.<span style="color: #006600;">isDigit</span><span style="color: #66cc66;">&#40;</span>cChar<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Determines if a string is numeric</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">boolean</span> IsNumeric<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"><span style="color: #aaaadd; font-weight: bold;">String</span></a> strString<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Validate</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> i = <span style="color: #cc66cc;">0</span>; i &lt; strString.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; i++<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html"><span style="color: #aaaadd; font-weight: bold;">Character</span></a>.<span style="color: #006600;">isDigit</span><span style="color: #66cc66;">&#40;</span>strString.<span style="color: #006600;">charAt</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #b13366;">false</span><span style="color: #66cc66;">&#41;</span> <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #b13366;">false</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #b13366;">true</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Parse numeric</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> ParseNumeric<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"><span style="color: #aaaadd; font-weight: bold;">String</span></a> strInput<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Declare variables</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuffer.html"><span style="color: #aaaadd; font-weight: bold;">StringBuffer</span></a> strBuffer = <span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuffer.html"><span style="color: #aaaadd; font-weight: bold;">StringBuffer</span></a><span style="color: #66cc66;">&#40;</span>strInput<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuffer.html"><span style="color: #aaaadd; font-weight: bold;">StringBuffer</span></a> strOutput = <span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuffer.html"><span style="color: #aaaadd; font-weight: bold;">StringBuffer</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"><span style="color: #aaaadd; font-weight: bold;">String</span></a> strTemp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">int</span> nFindStart = <span style="color: #cc66cc;">0</span>, nFindEnd = <span style="color: #cc66cc;">0</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html"><span style="color: #aaaadd; font-weight: bold;">Integer</span></a> nTemp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Get the month</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nFindEnd = strBuffer.<span style="color: #006600;">indexOf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/&quot;</span>, nFindStart<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>nFindEnd == <span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InvalidInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strTemp = strBuffer.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>nFindStart, nFindEnd<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Validate</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>IsNumeric<span style="color: #66cc66;">&#40;</span>strTemp<span style="color: #66cc66;">&#41;</span> == <span style="color: #b13366;">false</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InvalidInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>ValidateMonth<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html"><span style="color: #aaaadd; font-weight: bold;">Integer</span></a><span style="color: #66cc66;">&#40;</span>strTemp<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #b13366;">false</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InvalidInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Convert month</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nTemp = <span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html"><span style="color: #aaaadd; font-weight: bold;">Integer</span></a><span style="color: #66cc66;">&#40;</span>strTemp<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strOutput.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span>ConvertMonth<span style="color: #66cc66;">&#40;</span>nTemp.<span style="color: #006600;">intValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot; &quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Switch start and end</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nFindStart = nFindEnd + <span style="color: #cc66cc;">1</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Get day</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nFindEnd = strBuffer.<span style="color: #006600;">indexOf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/&quot;</span>, nFindStart<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>nFindEnd == <span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InvalidInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strTemp = strBuffer.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>nFindStart, nFindEnd<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Validate</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>IsNumeric<span style="color: #66cc66;">&#40;</span>strTemp<span style="color: #66cc66;">&#41;</span> == <span style="color: #b13366;">false</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InvalidInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Append</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strOutput.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span>strTemp + <span style="color: #ff0000;">&quot;, &quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Switch start and end</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nFindStart = nFindEnd + <span style="color: #cc66cc;">1</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Get year&nbsp; &nbsp; &nbsp;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strTemp = strBuffer.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>nFindStart<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Validate</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>IsNumeric<span style="color: #66cc66;">&#40;</span>strTemp<span style="color: #66cc66;">&#41;</span> == <span style="color: #b13366;">false</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InvalidInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nTemp = <span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html"><span style="color: #aaaadd; font-weight: bold;">Integer</span></a><span style="color: #66cc66;">&#40;</span>strTemp<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Append</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>strTemp.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>nTemp.<span style="color: #006600;">intValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> &lt;= <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strOutput.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;20&quot;</span> + strTemp<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strOutput.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;19&quot;</span> + strTemp<span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strOutput.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span>strTemp<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Output</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> + strOutput.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Parse string</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> ParseString<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"><span style="color: #aaaadd; font-weight: bold;">String</span></a> strInput<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Declare variables</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuffer.html"><span style="color: #aaaadd; font-weight: bold;">StringBuffer</span></a> strBuffer = <span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuffer.html"><span style="color: #aaaadd; font-weight: bold;">StringBuffer</span></a><span style="color: #66cc66;">&#40;</span>strInput<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuffer.html"><span style="color: #aaaadd; font-weight: bold;">StringBuffer</span></a> strOutput = <span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuffer.html"><span style="color: #aaaadd; font-weight: bold;">StringBuffer</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"><span style="color: #aaaadd; font-weight: bold;">String</span></a> strTemp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">int</span> nFindStart = <span style="color: #cc66cc;">0</span>, nFindEnd = <span style="color: #cc66cc;">0</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html"><span style="color: #aaaadd; font-weight: bold;">Integer</span></a> nTemp;&nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Get the month</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nFindEnd = strBuffer.<span style="color: #006600;">indexOf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot; &quot;</span>, nFindStart<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>nFindEnd == <span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InvalidInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strTemp = strBuffer.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>nFindStart, nFindEnd<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Validate</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nTemp = <span style="color: #000000; font-weight: bold;">new</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html"><span style="color: #aaaadd; font-weight: bold;">Integer</span></a><span style="color: #66cc66;">&#40;</span>ValidateMonth<span style="color: #66cc66;">&#40;</span>strTemp<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>nTemp.<span style="color: #006600;">intValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InvalidInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Append</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strOutput.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span>nTemp.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Switch start and end</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nFindStart = nFindEnd + <span style="color: #cc66cc;">1</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Get day</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nFindEnd = strBuffer.<span style="color: #006600;">indexOf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;, &quot;</span>, nFindStart<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>nFindEnd == <span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InvalidInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strTemp = strBuffer.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>nFindStart, nFindEnd<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Append</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strOutput.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span>strTemp + <span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Switch start and end</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nFindStart = nFindEnd + <span style="color: #cc66cc;">2</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Get year&nbsp; &nbsp; &nbsp;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strTemp = strBuffer.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>nFindStart<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Validate</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>IsNumeric<span style="color: #66cc66;">&#40;</span>strTemp<span style="color: #66cc66;">&#41;</span> == <span style="color: #b13366;">false</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InvalidInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// -- Append&nbsp; &nbsp; </span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strOutput.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span>strTemp<span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Output</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> + strOutput.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Convert month</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"><span style="color: #aaaadd; font-weight: bold;">String</span></a> ConvertMonth<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> nMonth<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Convert</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> m_strMonths<span style="color: #66cc66;">&#91;</span>nMonth - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Validate month</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">boolean</span> ValidateMonth<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html"><span style="color: #aaaadd; font-weight: bold;">Integer</span></a> nMonth<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Validate</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>nMonth.<span style="color: #006600;">intValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> &gt;= <span style="color: #cc66cc;">1</span> || nMonth.<span style="color: #006600;">intValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> &lt;= <span style="color: #cc66cc;">12</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #b13366;">true</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #b13366;">false</span>;&nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// * Validate month</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">int</span> ValidateMonth<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"><span style="color: #aaaadd; font-weight: bold;">String</span></a> strMonth<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Go through all months</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> i = <span style="color: #cc66cc;">0</span>; i &lt; m_strMonths.<span style="color: #006600;">length</span>; i++<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>m_strMonths<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">equalsIgnoreCase</span><span style="color: #66cc66;">&#40;</span>strMonth<span style="color: #66cc66;">&#41;</span> == <span style="color: #b13366;">true</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> i + <span style="color: #cc66cc;">1</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #cc66cc;">-1</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('<span style="color: #66cc66;">&#125;</span></div>');
document.write('<br />&nbsp;<br /><div style="font-size: 12px">Brought to you by the community at <a href="http://www.bytemycode.com/snippets/snippet/42/1/" target="_blank">byteMyCode</a>.</div>');
