Location: PHPKode > projects > PhpiCalLib > doc/PhpiCalLib/PhpiCalLib_DataTypes_Date.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class PhpiCalLib_DataTypes_Date</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			

<h2 class="class-name">Class PhpiCalLib_DataTypes_Date</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-vars">Vars</a>
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The date data type.</p>
<p class="description"><p><pre>        date               = date-value

        date-value         = date-fullyear date-month date-mday
        date-fullyear      = 4DIGIT
        date-month         = 2DIGIT        ;01-12
        date-mday          = 2DIGIT        ;01-28, 01-29, 01-30, 01-31</pre></p></p>
	<ul class="tags">
				<li><span class="field">link:</span> <a href="http://tools.ietf.org/html/draft-ietf-calsify-rfc2445bis-08#section-3.3.4">http://tools.ietf.org/html/draft-ietf-calsify-rfc2445bis-08#section-3.3.4</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_datatypes.php.html">/datatypes.php</a> (line <span class="field">146</span>)
		</p>
		
				
		<pre><a href="../PhpiCalLib/PhpiCalLib_DataType.html">PhpiCalLib_DataType</a>
   |
   --PhpiCalLib_DataTypes_Date</pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-vars">Vars</a>
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																				<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#DecodeTimeStamp" title="details" class="method-name">DecodeTimeStamp</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$TimeStamp</span>, <span class="var-type">bool</span>&nbsp;<span class="var-name">$Utc</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#DigitCheck" title="details" class="method-name">DigitCheck</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$Number</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$TokenName</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$MinValue</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$MaxValue</span>)
									</div>
																																																																																																
												<div class="method-definition">
											<span class="method-result">PhpiCalLib_DataTypes_Date</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
																																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#FromTimeStamp" title="details" class="method-name">FromTimeStamp</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$TimeStamp</span>, <span class="var-type">bool</span>&nbsp;<span class="var-name">$Utc</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">integer</span>
										<a href="#GetFullYear" title="details" class="method-name">GetFullYear</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">integer</span>
										<a href="#GetMonth" title="details" class="method-name">GetMonth</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">integer</span>
										<a href="#GetMonthDay" title="details" class="method-name">GetMonthDay</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#Parse" title="details" class="method-name">Parse</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$EncodedString</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#SetFullYear" title="details" class="method-name">SetFullYear</a>
											(<span class="var-type">number</span>&nbsp;<span class="var-name">$Number</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#SetMonth" title="details" class="method-name">SetMonth</a>
											(<span class="var-type">number</span>&nbsp;<span class="var-name">$Number</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#SetMonthDay" title="details" class="method-name">SetMonthDay</a>
											(<span class="var-type">number</span>&nbsp;<span class="var-name">$Number</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#SetYear" title="details" class="method-name">SetYear</a>
											(<span class="var-type">number</span>&nbsp;<span class="var-name">$Number</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#ToString" title="details" class="method-name">ToString</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">integer</span>
										<a href="#ToTimeStamp" title="details" class="method-name">ToTimeStamp</a>
										()
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
							<h4>Inherited Variables</h4>
				<A NAME='inherited_vars'><!-- --></A>
									<p>Inherited from <span class="classname"><a href="../PhpiCalLib/PhpiCalLib_DataType.html">PhpiCalLib_DataType</a></span></p>
					<blockquote>
													<span class="var-title">
								<span class="var-name"><a href="../PhpiCalLib/PhpiCalLib_DataType.html#var$DataType">PhpiCalLib_DataType::$DataType</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../PhpiCalLib/PhpiCalLib_DataType.html#var$IanaTokenRegex">PhpiCalLib_DataType::$IanaTokenRegex</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../PhpiCalLib/PhpiCalLib_DataType.html#var$TypeMap">PhpiCalLib_DataType::$TypeMap</a></span><br>
							</span>
											</blockquote> 
										
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-vars">Vars</a>
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodDecodeTimeStamp" id="DecodeTimeStamp"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method DecodeTimeStamp</span> (line <span class="line-number">242</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Decode a timestamp to an array of values like localtime() does, but with support for UTC</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">void</span>
		<span class="method-name">
			DecodeTimeStamp
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$TimeStamp</span>, <span class="var-type">bool</span>&nbsp;<span class="var-name">$Utc</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$TimeStamp</span><span class="var-description">: A unix timestamp</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$Utc</span><span class="var-description">: true to extract the date WRT to utc, false to extract the &quot;local time&quot;</span>			</li>
				</ul>
		
			
	</div>
<a name="methodDigitCheck" id="DigitCheck"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method DigitCheck</span> (line <span class="line-number">297</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Check that the Number matches 2DIGIT and is in range</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">void</span>
		<span class="method-name">
			DigitCheck
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$Number</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$TokenName</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$MinValue</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$MaxValue</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$Number</span><span class="var-description">: The proposed number</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$TokenName</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$MinValue</span><span class="var-description">: The minimum legitimate value</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$MaxValue</span><span class="var-description">: The maximum legitimate value</span>			</li>
				</ul>
		
			
	</div>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">157</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">PhpiCalLib_DataTypes_Date</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodFromTimeStamp" id="FromTimeStamp"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">FromTimeStamp</span> (line <span class="line-number">271</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Extract the date from the given timestamp</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			FromTimeStamp
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$TimeStamp</span>, <span class="var-type">bool</span>&nbsp;<span class="var-name">$Utc</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$TimeStamp</span><span class="var-description">: Unix epoch WRT to UTC</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$Utc</span><span class="var-description">: true to extract the date WRT to utc, false to extract the &quot;local time&quot;</span>			</li>
				</ul>
		
			
	</div>
<a name="methodGetFullYear" id="GetFullYear"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">GetFullYear</span> (line <span class="line-number">180</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Access the date-fullyear</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">integer</span>
		<span class="method-name">
			GetFullYear
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodGetMonth" id="GetMonth"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">GetMonth</span> (line <span class="line-number">212</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Access the date-month</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">integer</span>
		<span class="method-name">
			GetMonth
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodGetMonthDay" id="GetMonthDay"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">GetMonthDay</span> (line <span class="line-number">232</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Access the date-mday</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">integer</span>
		<span class="method-name">
			GetMonthDay
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodParse" id="Parse"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Parse</span> (line <span class="line-number">316</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Extract the date value from the encoded string</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			Parse
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$EncodedString</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$EncodedString</span>			</li>
				</ul>
		
			
	</div>
<a name="methodSetFullYear" id="SetFullYear"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">SetFullYear</span> (line <span class="line-number">166</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the date-fullyear component of the date-value</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			SetFullYear
		</span>
					(<span class="var-type">number</span>&nbsp;<span class="var-name">$Number</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">number</span>
				<span class="var-name">$Number</span>			</li>
				</ul>
		
			
	</div>
<a name="methodSetMonth" id="SetMonth"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">SetMonth</span> (line <span class="line-number">201</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the date-month component of the date-value</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			SetMonth
		</span>
					(<span class="var-type">number</span>&nbsp;<span class="var-name">$Number</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">number</span>
				<span class="var-name">$Number</span>			</li>
				</ul>
		
			
	</div>
<a name="methodSetMonthDay" id="SetMonthDay"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">SetMonthDay</span> (line <span class="line-number">221</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the date-mday component of the date-value</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			SetMonthDay
		</span>
					(<span class="var-type">number</span>&nbsp;<span class="var-name">$Number</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">number</span>
				<span class="var-name">$Number</span>			</li>
				</ul>
		
			
	</div>
<a name="methodSetYear" id="SetYear"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">SetYear</span> (line <span class="line-number">189</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the date-fullyear component of the date-value</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			SetYear
		</span>
					(<span class="var-type">number</span>&nbsp;<span class="var-name">$Number</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">number</span>
				<span class="var-name">$Number</span><span class="var-description">: A number of years since 1900</span>			</li>
				</ul>
		
			
	</div>
<a name="methodToString" id="ToString"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">ToString</span> (line <span class="line-number">338</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Convert to string</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			ToString
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodToTimeStamp" id="ToTimeStamp"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">ToTimeStamp</span> (line <span class="line-number">284</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the date WRT to midnight, UTC</p>
	<ul class="tags">
				<li><span class="field">return:</span> Seconds since January 1 1970 00:00:00 GMT</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">integer</span>
		<span class="method-name">
			ToTimeStamp
		</span>
				()
			</div>
	
		
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../PhpiCalLib/PhpiCalLib_DataType.html">PhpiCalLib_DataType</a></span></p>
					<blockquote>
													<span class="method-name"><a href="../PhpiCalLib/PhpiCalLib_DataType.html#methodFromDataType">PhpiCalLib_DataType::FromDataType()</a></span><br>
													<span class="method-name"><a href="../PhpiCalLib/PhpiCalLib_DataType.html#methodToDataType">PhpiCalLib_DataType::ToDataType()</a></span><br>
											</blockquote>
										
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Tue, 01 Apr 2008 01:07:11 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
	</p>
	</div></body>
</html>
Return current item: PhpiCalLib