52 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <html lang="en"><!-- use theme color or fallback -->
 | |
| <!--use textcolor from settings, otherwise create a contrasting color to theme color-->
 | |
| <head><meta charset="utf-8"/><link href="./bootstrap/css/bootstrap.min.css" rel="stylesheet"/><link href="./bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet"/><link href="./bootstrap/css/bootstrap-select.min.css" rel="stylesheet"/><link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700,700italic,400italic" rel="stylesheet" type="text/css"/><link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,600,600italic,400" rel="stylesheet" type="text/css"/><link href="http://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css" rel="stylesheet" type="text/css"/><script src="./jquery-1.9.1.min.js"></script><script src="./bootstrap/js/bootstrap.min.js"></script><script src="./bootstrap/js/bootstrap-select.min.js"></script><link href="./styles.css" rel="stylesheet"/><link href="./haxe-nav.css" rel="stylesheet"/><script type="text/javascript">var dox = {rootPath: "./",platforms: ["Neko","Android","Flash","iOS","macOS","Linux","HTML5","Windows"]};</script><script type="text/javascript" src="./nav.js"></script><script type="text/javascript" src="./index.js"></script><link rel="icon" href="./favicon.ico" type="image/x-icon"></link><title>Date - API Reference</title><meta name="description" content="The Date class provides a basic structure for date and time related
 | |
| information. Date instances can be created by"/></head><body><style>
 | |
| a, code .type {
 | |
| 	color: #24afc4;
 | |
| }
 | |
| .navbar .brand {
 | |
| 	display: inline-block;
 | |
| 	float: none;
 | |
| 	text-shadow: 0 0 0 transparent;
 | |
| }
 | |
| .nav-list>.active>a.treeLink, .nav-list>.active>a.treeLink:hover, .nav-list>.active>a.treeLink:focus {
 | |
| 	background: #24afc4;
 | |
| 	color: #ffffff;
 | |
| 	text-shadow: 0 0 0 transparent;
 | |
| }
 | |
| .navbar .container {
 | |
| 	width: 940px ;
 | |
| }
 | |
| @media (max-width: 767px) {
 | |
| 	.navbar .container {
 | |
| 		width: auto;
 | |
| 	}
 | |
| }
 | |
| @media (max-width: 979px) and (min-width: 768px) {
 | |
| 	.navbar .container {
 | |
| 		width: 724px;
 | |
| 	}
 | |
| }
 | |
| @media (min-width: 1200px) {
 | |
| 	.navbar .container {
 | |
| 		width: 1170px;
 | |
| 	}
 | |
| }
 | |
| .navbar .container img {
 | |
| 	margin: 5px 0 0 4px;
 | |
| }
 | |
| </style><nav class="nav"><div class="navbar"><div class="navbar-inner" style="background:#FAFAFA; border-bottom:1px solid rgba(0,0,0,.09)"><div class="container"><a class="brand" href="http://www.openfl.org"><img alt="" src="http://www.openfl.org/images/logo.png"/></a><a class="brand" style="color:#777777" href="./">API Reference</a></div></div></div></nav><div class="container main-content"><div class="row-fluid"><div class="span3"><div class="well sidebar-nav"><form class="form-search" id="searchForm"><div class="input-prepend input-block-level"><span class="add-on"><i class="icon-search"></i></span><input id="search" type="text" placeholder="Search" autocomplete="off"/></div></form><div class="dropdown"><select id="select-platform" class="selectpicker" title="Filter by platform" data-width="100%"><option value="all" selected="true">All Platforms</option><option>Neko</option><option>Android</option><option>Flash</option><option>iOS</option><option>macOS</option><option>Linux</option><option>HTML5</option><option>Windows</option></select></div></div><div class="well sidebar-nav"><div id="nav"></div></div></div><div class="span9"><div class="page-header"><h1><small>class</small> Date</h1><h4><small><a href="./">no package</a></small></h4>    <p class="availability"><hr/><em>Available on  all platforms</em></p></div><div class="body"><div class="doc doc-main"><div class="indent"><p>The Date class provides a basic structure for date and time related
 | |
| information. Date instances can be created by</p><ul><li><code>new <a href="./Date.html">Date</a>()</code> for a specific date,</li><li><code><a href="./Date.html#now">Date.now</a>()</code> to obtain information about the current time,</li><li><code><a href="./Date.html#fromTime">Date.fromTime</a>()</code> with a given timestamp or</li><li><code><a href="./Date.html#fromString">Date.fromString</a>()</code> by parsing from a String.</li></ul>
 | |
| <p>There are some extra functions available in the <code>DateTools</code> class.</p>
 | |
| <p>In the context of Haxe dates, a timestamp is defined as the number of
 | |
| milliseconds elapsed since 1st January 1970.</p></div></div><h3 class="section">Constructor</h3><div class="fields"><div class="field "><a name="new"></a><h3><p><code><a href="#new"><span class="identifier">new</span></a> (<span style="white-space:nowrap">year:<a class="type" title="The standard Int type." href="./Int.html">Int</a>,</span> <span style="white-space:nowrap">month:<a class="type" title="The standard Int type." href="./Int.html">Int</a>,</span> <span style="white-space:nowrap">day:<a class="type" title="The standard Int type." href="./Int.html">Int</a>,</span> <span style="white-space:nowrap">hour:<a class="type" title="The standard Int type." href="./Int.html">Int</a>,</span> <span style="white-space:nowrap">min:<a class="type" title="The standard Int type." href="./Int.html">Int</a>,</span> <span style="white-space:nowrap">sec:<a class="type" title="The standard Int type." href="./Int.html">Int</a></span>)</code></p></h3><div class="doc"><p>Creates a new date object from the given arguments.</p>
 | |
| <p>The behaviour of a Date instance is only consistent across platforms if
 | |
| the the arguments describe a valid date.</p><ul><li>month: 0 to 11</li><li>day: 1 to 31</li><li>hour: 0 to 23</li><li>min: 0 to 59</li><li>sec: 0 to 59</li></ul></div></div></div><h3 class="section">Methods</h3><div class="fields"><div class="field "><a name="getDate"></a><h3><p><code><a href="#getDate"><span class="identifier">getDate</span></a> ():<a class="type" title="The standard Int type." href="./Int.html">Int</a></code></p></h3><p class="availability"><em>Available on  Neko, Flash, macOS, Linux, HTML5, Windows</em></p><div class="doc"><p>Returns the day of <code>this</code> Date (1-31 range).</p></div></div><div class="field "><a name="getDay"></a><h3><p><code><a href="#getDay"><span class="identifier">getDay</span></a> ():<a class="type" title="The standard Int type." href="./Int.html">Int</a></code></p></h3><p class="availability"><em>Available on  Flash, HTML5</em></p><div class="doc"><p>Returns the day of the week of <code>this</code> Date (0-6 range) where <code>0</code> is Sunday.</p></div></div><div class="field "><a name="getFullYear"></a><h3><p><code><a href="#getFullYear"><span class="identifier">getFullYear</span></a> ():<a class="type" title="The standard Int type." href="./Int.html">Int</a></code></p></h3><p class="availability"><em>Available on  Neko, Flash, macOS, Linux, HTML5, Windows</em></p><div class="doc"><p>Returns the full year of <code>this</code> Date (4-digits).</p></div></div><div class="field "><a name="getHours"></a><h3><p><code><a href="#getHours"><span class="identifier">getHours</span></a> ():<a class="type" title="The standard Int type." href="./Int.html">Int</a></code></p></h3><p class="availability"><em>Available on  Neko, Flash, macOS, Linux, HTML5, Windows</em></p><div class="doc"><p>Returns the hours of <code>this</code> Date (0-23 range).</p></div></div><div class="field "><a name="getMinutes"></a><h3><p><code><a href="#getMinutes"><span class="identifier">getMinutes</span></a> ():<a class="type" title="The standard Int type." href="./Int.html">Int</a></code></p></h3><p class="availability"><em>Available on  Neko, Flash, macOS, Linux, HTML5, Windows</em></p><div class="doc"><p>Returns the minutes of <code>this</code> Date (0-59 range).</p></div></div><div class="field "><a name="getMonth"></a><h3><p><code><a href="#getMonth"><span class="identifier">getMonth</span></a> ():<a class="type" title="The standard Int type." href="./Int.html">Int</a></code></p></h3><p class="availability"><em>Available on  Neko, Flash, macOS, Linux, HTML5, Windows</em></p><div class="doc"><p>Returns the month of <code>this</code> Date (0-11 range).</p></div></div><div class="field "><a name="getSeconds"></a><h3><p><code><a href="#getSeconds"><span class="identifier">getSeconds</span></a> ():<a class="type" title="The standard Int type." href="./Int.html">Int</a></code></p></h3><p class="availability"><em>Available on  Neko, Flash, macOS, Linux, HTML5, Windows</em></p><div class="doc"><p>Returns the seconds of <code>this</code> Date (0-59 range).</p></div></div><div class="field "><a name="getTime"></a><h3><p><code><a href="#getTime"><span class="identifier">getTime</span></a> ():<a class="type" title="The standard Float type, this is a double-precision IEEE 64bit float." href="./Float.html">Float</a></code></p></h3><div class="doc"><p>Returns the timestamp (in milliseconds) of the date. It might
 | |
| only have a per-second precision depending on the platforms.</p></div></div><div class="field "><a name="toString"></a><h3><p><code><a href="#toString"><span class="identifier">toString</span></a> ():<a class="type" title="The basic String class." href="./String.html">String</a></code></p></h3><div class="doc"><p>Returns a string representation of <code>this</code> Date, by using the
 | |
| standard format [YYYY-MM-DD HH:MM:SS]. See <code>DateTools.format</code> for
 | |
| other formating rules.</p></div></div></div><h3 class="section">Static methods</h3><div class="fields"><div class="field "><a name="fromString"></a><h3><p><code><span class="label">static</span><a href="#fromString"><span class="identifier">fromString</span></a> (<span style="white-space:nowrap">s:<a class="type" title="The basic String class." href="./String.html">String</a></span>):<a class="type" title="The Date class provides a basic structure for date and time related information." href="./Date.html">Date</a></code></p></h3><div class="doc"><p>Returns a Date from a formated string <code>s</code>, with the following accepted
 | |
| formats:</p><ul><li><code>"YYYY-MM-DD hh:mm:ss"</code></li><li><code>"YYYY-MM-DD"</code></li><li><code>"hh:mm:ss"</code></li></ul>
 | |
| <p>The first two formats are expressed in local time, the third in UTC
 | |
| Epoch.</p></div></div><div class="field "><a name="fromTime"></a><h3><p><code><span class="label">static</span><a href="#fromTime"><span class="identifier">fromTime</span></a> (<span style="white-space:nowrap">t:<a class="type" title="The standard Float type, this is a double-precision IEEE 64bit float." href="./Float.html">Float</a></span>):<a class="type" title="The Date class provides a basic structure for date and time related information." href="./Date.html">Date</a></code></p></h3><div class="doc"><p>Returns a Date from timestamp <code>t</code>.</p></div></div><div class="field "><a name="now"></a><h3><p><code><span class="label">static</span><a href="#now"><span class="identifier">now</span></a> ():<a class="type" title="The Date class provides a basic structure for date and time related information." href="./Date.html">Date</a></code></p></h3><div class="doc"><p>Returns a Date representing the current local time.</p></div></div></div></div></div></div></div><footer class="section site-footer" style="background:#FAFAFA"><div class="container"><div class="copyright"><p style="color:#777777">© 2017  <a style="color:#777777" href="http://www.openfl.org">http://www.openfl.org</a></p></div></div></footer><script src=".//highlighter.js"></script><link href="./highlighter.css" rel="stylesheet"/></body></html> |