~ubuntu-branches/ubuntu/natty/otrs2/natty-updates

« back to all changes in this revision

Viewing changes to var/httpd/htdocs/yui/2.7.0/as-docs/com/yahoo/astra/utils/DateUtil.html

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2010-08-09 19:43:44 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20100809194344-absef1ut5mfj3qhv
Tags: 2.4.7+dfsg1-1
* Strip out yui from the source in the dfsg version.
  Closes: #591196
* Depend on libjs-yui and link to this package, instead of using the embedded
  yui version. This changes make the flash ticket statistics unuseable!
  Closes: #592146

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
 
<html>
3
 
<head>
4
 
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
 
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
6
 
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
7
 
<meta content="DateUtil,com.yahoo.astra.utils.DateUtil,DAYS_IN_APRIL,DAYS_IN_AUGUST,DAYS_IN_DECEMBER,DAYS_IN_FEBRUARY,DAYS_IN_FEBRUARY_LEAP_YEAR,DAYS_IN_JANUARY,DAYS_IN_JULY,DAYS_IN_JUNE,DAYS_IN_LEAP_YEAR,DAYS_IN_MARCH,DAYS_IN_MAY,DAYS_IN_NOVEMBER,DAYS_IN_OCTOBER,DAYS_IN_SEPTEMBER,DAYS_IN_YEAR,daysInMonths,months,countDays,getDateDifferenceByTimeUnit,getHoursIn12HourFormat,getMonthName,getShortMonthName,isLeapYear,roundDown,roundUp,timeCodeToUTC" name="keywords">
8
 
<title>com.yahoo.astra.utils.DateUtil</title>
9
 
</head>
10
 
<body>
11
 
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
12
 
<!--
13
 
                                asdocTitle = 'DateUtil - YUI Flash Component Documentation';
14
 
                                var baseRef = '../../../../';
15
 
                                window.onload = configPage;
16
 
                        --></script>
17
 
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
18
 
<tr>
19
 
<td align="left" class="titleTableTitle">YUI Flash Component Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?com/yahoo/astra/utils/DateUtil.html&amp;com/yahoo/astra/utils/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
20
 
</tr>
21
 
<tr class="titleTableRow2">
22
 
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;DateUtil</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
23
 
</tr>
24
 
<tr class="titleTableRow3">
25
 
<td colspan="2">&nbsp;</td>
26
 
</tr>
27
 
</table>
28
 
<script type="text/javascript" language="javascript">
29
 
<!--
30
 
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class DateUtil"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);}
31
 
--></script>
32
 
<div class="MainContent">
33
 
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
34
 
<tr>
35
 
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.yahoo.astra.utils</a></td>
36
 
</tr>
37
 
<tr>
38
 
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class DateUtil</td>
39
 
</tr>
40
 
</table>
41
 
<p></p>
42
 
  A collection of utility functions for the manipulation and inspection of date and time values.
43
 
  
44
 
  <p></p>
45
 
<p>
46
 
<span class="classHeaderTableLabel">See also</span>
47
 
</p>
48
 
<div class="seeAlso">Date</div>
49
 
<br>
50
 
<hr>
51
 
</div>
52
 
<a name="propertySummary"></a>
53
 
<div class="summarySection">
54
 
<div class="summaryTableTitle">Public Properties</div>
55
 
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
56
 
<tr>
57
 
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
58
 
</tr>
59
 
<tr class="">
60
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#daysInMonths">daysInMonths</a> : Array<div class="summaryTableDescription">[static]
61
 
   The number of days appearing in each month.</div>
62
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
63
 
</tr>
64
 
<tr class="">
65
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#months">months</a> : Array<div class="summaryTableDescription">[static]
66
 
   The names of months in English.</div>
67
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
68
 
</tr>
69
 
</table>
70
 
</div>
71
 
<a name="methodSummary"></a>
72
 
<div class="summarySection">
73
 
<div class="summaryTableTitle">Public Methods</div>
74
 
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
75
 
<tr>
76
 
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
77
 
</tr>
78
 
<tr class="">
79
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
80
 
<div class="summarySignature">
81
 
<a class="signatureLink" href="#countDays()">countDays</a>(start:Date, end:Date):Number</div>
82
 
<div class="summaryTableDescription">[static]
83
 
   Determines the number of days between the start value and the end value.</div>
84
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
85
 
</tr>
86
 
<tr class="">
87
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
88
 
<div class="summarySignature">
89
 
<a class="signatureLink" href="#getDateDifferenceByTimeUnit()">getDateDifferenceByTimeUnit</a>(minDate:Date, maxDate:Date, timeUnit:String):Number</div>
90
 
<div class="summaryTableDescription">[static]</div>
91
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
92
 
</tr>
93
 
<tr class="">
94
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
95
 
<div class="summarySignature">
96
 
<a class="signatureLink" href="#getHoursIn12HourFormat()">getHoursIn12HourFormat</a>(value:Date):Number</div>
97
 
<div class="summaryTableDescription">[static]
98
 
   Determines the hours value in the range 1 - 12 for the AM/PM time format.</div>
99
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
100
 
</tr>
101
 
<tr class="">
102
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
103
 
<div class="summarySignature">
104
 
<a class="signatureLink" href="#getMonthName()">getMonthName</a>(index:int):String</div>
105
 
<div class="summaryTableDescription">[static]
106
 
   Gets the English name of the month specified by index.</div>
107
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
108
 
</tr>
109
 
<tr class="">
110
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
111
 
<div class="summarySignature">
112
 
<a class="signatureLink" href="#getShortMonthName()">getShortMonthName</a>(index:int):String</div>
113
 
<div class="summaryTableDescription">[static]
114
 
   Gets the abbreviated month name specified by index.</div>
115
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
116
 
</tr>
117
 
<tr class="">
118
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
119
 
<div class="summarySignature">
120
 
<a class="signatureLink" href="#isLeapYear()">isLeapYear</a>(year:int):Boolean</div>
121
 
<div class="summaryTableDescription">[static]
122
 
   Determines if the input year is a leap year (with 366 days, rather than 365).</div>
123
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
124
 
</tr>
125
 
<tr class="">
126
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
127
 
<div class="summarySignature">
128
 
<a class="signatureLink" href="#roundDown()">roundDown</a>(dateToRound:Date, timeUnit:String = "day"):Date</div>
129
 
<div class="summaryTableDescription">[static]
130
 
   Rounds a Date value down to the nearest value on the specified time unit.</div>
131
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
132
 
</tr>
133
 
<tr class="">
134
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
135
 
<div class="summarySignature">
136
 
<a class="signatureLink" href="#roundUp()">roundUp</a>(dateToRound:Date, timeUnit:String = "day"):Date</div>
137
 
<div class="summaryTableDescription">[static]
138
 
   Rounds a Date value up to the nearest value on the specified time unit.</div>
139
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
140
 
</tr>
141
 
<tr class="">
142
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
143
 
<div class="summarySignature">
144
 
<a class="signatureLink" href="#timeCodeToUTC()">timeCodeToUTC</a>(timecode:String):String</div>
145
 
<div class="summaryTableDescription">[static]
146
 
   Converts a time code to UTC.</div>
147
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
148
 
</tr>
149
 
</table>
150
 
</div>
151
 
<a name="constantSummary"></a>
152
 
<div class="summarySection">
153
 
<div class="summaryTableTitle">Public Constants</div>
154
 
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
155
 
<tr>
156
 
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
157
 
</tr>
158
 
<tr class="">
159
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_APRIL">DAYS_IN_APRIL</a> : int = 30<div class="summaryTableDescription">[static]
160
 
   The number of days in April.</div>
161
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
162
 
</tr>
163
 
<tr class="">
164
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_AUGUST">DAYS_IN_AUGUST</a> : int = 31<div class="summaryTableDescription">[static]
165
 
   The number of days in August.</div>
166
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
167
 
</tr>
168
 
<tr class="">
169
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_DECEMBER">DAYS_IN_DECEMBER</a> : int = 31<div class="summaryTableDescription">[static]
170
 
   The number of days in December.</div>
171
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
172
 
</tr>
173
 
<tr class="">
174
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_FEBRUARY">DAYS_IN_FEBRUARY</a> : int = 28<div class="summaryTableDescription">[static]
175
 
   The number of days in February on a standard year.</div>
176
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
177
 
</tr>
178
 
<tr class="">
179
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_FEBRUARY_LEAP_YEAR">DAYS_IN_FEBRUARY_LEAP_YEAR</a> : int = 29<div class="summaryTableDescription">[static]
180
 
   The number of days in February on a leap year.</div>
181
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
182
 
</tr>
183
 
<tr class="">
184
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_JANUARY">DAYS_IN_JANUARY</a> : int = 31<div class="summaryTableDescription">[static]
185
 
   The number of days in January.</div>
186
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
187
 
</tr>
188
 
<tr class="">
189
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_JULY">DAYS_IN_JULY</a> : int = 31<div class="summaryTableDescription">[static]
190
 
   The number of days in July.</div>
191
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
192
 
</tr>
193
 
<tr class="">
194
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_JUNE">DAYS_IN_JUNE</a> : int = 30<div class="summaryTableDescription">[static]
195
 
   The number of days in June.</div>
196
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
197
 
</tr>
198
 
<tr class="">
199
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_LEAP_YEAR">DAYS_IN_LEAP_YEAR</a> : int = 366<div class="summaryTableDescription">[static]
200
 
   The number of days in a leap year.</div>
201
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
202
 
</tr>
203
 
<tr class="">
204
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_MARCH">DAYS_IN_MARCH</a> : int = 31<div class="summaryTableDescription">[static]
205
 
   The number of days in March.</div>
206
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
207
 
</tr>
208
 
<tr class="">
209
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_MAY">DAYS_IN_MAY</a> : int = 31<div class="summaryTableDescription">[static]
210
 
   The number of days in May.</div>
211
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
212
 
</tr>
213
 
<tr class="">
214
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_NOVEMBER">DAYS_IN_NOVEMBER</a> : int = 30<div class="summaryTableDescription">[static]
215
 
   The number of days in November.</div>
216
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
217
 
</tr>
218
 
<tr class="">
219
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_OCTOBER">DAYS_IN_OCTOBER</a> : int = 31<div class="summaryTableDescription">[static]
220
 
   The number of days in October.</div>
221
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
222
 
</tr>
223
 
<tr class="">
224
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_SEPTEMBER">DAYS_IN_SEPTEMBER</a> : int = 30<div class="summaryTableDescription">[static]
225
 
   The number of days in September.</div>
226
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
227
 
</tr>
228
 
<tr class="">
229
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DAYS_IN_YEAR">DAYS_IN_YEAR</a> : int = 365<div class="summaryTableDescription">[static]
230
 
   The number of days in a standard year.</div>
231
 
</td><td class="summaryTableOwnerCol">DateUtil</td>
232
 
</tr>
233
 
</table>
234
 
</div>
235
 
<script type="text/javascript" language="javascript">
236
 
<!--
237
 
showHideInherited();
238
 
--></script>
239
 
<div class="MainContent">
240
 
<a name="propertyDetail"></a>
241
 
<div class="detailSectionHeader">Property detail</div>
242
 
<a name="daysInMonths"></a>
243
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
244
 
<tr>
245
 
<td class="detailHeaderName">daysInMonths</td><td class="detailHeaderType">property</td>
246
 
</tr>
247
 
</table>
248
 
<div class="detailBody">
249
 
<code>public static var daysInMonths:Array</code><p>
250
 
   The number of days appearing in each month. May be used for easy index lookups.
251
 
   The stored value for February corresponds to a standard year--not a leap year.
252
 
   </p></div>
253
 
<a name="months"></a>
254
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
255
 
<tr>
256
 
<td class="detailHeaderName">months</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
257
 
</tr>
258
 
</table>
259
 
<div class="detailBody">
260
 
<code>public static var months:Array</code><p>
261
 
   The names of months in English. The index in the array corresponds to the value of the month
262
 
   in a date object.
263
 
   </p></div>
264
 
<a name="methodDetail"></a>
265
 
<div class="detailSectionHeader">Method detail</div>
266
 
<a name="countDays()"></a>
267
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
268
 
<tr>
269
 
<td class="detailHeaderName">countDays</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
270
 
</tr>
271
 
</table>
272
 
<div class="detailBody">
273
 
<code>public static function countDays(start:Date, end:Date):Number</code><p>
274
 
   Determines the number of days between the start value and the end value. The result
275
 
   may contain a fractional part, so cast it to int if a whole number is desired.
276
 
   
277
 
   </p><span class="label">Parameters</span>
278
 
<table border="0" cellspacing="0" cellpadding="0">
279
 
<tr>
280
 
<td width="20px"></td><td><code><span class="label">start</span>:Date</code> &mdash; start the starting date of the range
281
 
   </td>
282
 
</tr>
283
 
<tr>
284
 
<td class="paramSpacer">&nbsp;</td>
285
 
</tr>
286
 
<tr>
287
 
<td width="20px"></td><td><code><span class="label">end</span>:Date</code> &mdash; end  the ending date of the range
288
 
   </td>
289
 
</tr>
290
 
</table>
291
 
<p></p>
292
 
<span class="label">Returns</span>
293
 
<table border="0" cellspacing="0" cellpadding="0">
294
 
<tr>
295
 
<td width="20"></td><td><code>Number</code> &mdash;  the number of dats between start and end
296
 
   </td>
297
 
</tr>
298
 
</table>
299
 
</div>
300
 
<a name="getDateDifferenceByTimeUnit()"></a>
301
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
302
 
<tr>
303
 
<td class="detailHeaderName">getDateDifferenceByTimeUnit</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
304
 
</tr>
305
 
</table>
306
 
<div class="detailBody">
307
 
<code>public static function getDateDifferenceByTimeUnit(minDate:Date, maxDate:Date, timeUnit:String):Number</code><span class="label">Parameters</span>
308
 
<table border="0" cellspacing="0" cellpadding="0">
309
 
<tr>
310
 
<td width="20px"></td><td><code><span class="label">minDate</span>:Date</code></td>
311
 
</tr>
312
 
<tr>
313
 
<td class="paramSpacer">&nbsp;</td>
314
 
</tr>
315
 
<tr>
316
 
<td width="20px"></td><td><code><span class="label">maxDate</span>:Date</code></td>
317
 
</tr>
318
 
<tr>
319
 
<td class="paramSpacer">&nbsp;</td>
320
 
</tr>
321
 
<tr>
322
 
<td width="20px"></td><td><code><span class="label">timeUnit</span>:String</code></td>
323
 
</tr>
324
 
</table>
325
 
<p></p>
326
 
<span class="label">Returns</span>
327
 
<table border="0" cellspacing="0" cellpadding="0">
328
 
<tr>
329
 
<td width="20"></td><td><code>Number</code></td>
330
 
</tr>
331
 
</table>
332
 
</div>
333
 
<a name="getHoursIn12HourFormat()"></a>
334
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
335
 
<tr>
336
 
<td class="detailHeaderName">getHoursIn12HourFormat</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
337
 
</tr>
338
 
</table>
339
 
<div class="detailBody">
340
 
<code>public static function getHoursIn12HourFormat(value:Date):Number</code><p>
341
 
   Determines the hours value in the range 1 - 12 for the AM/PM time format.
342
 
   
343
 
   </p><span class="label">Parameters</span>
344
 
<table border="0" cellspacing="0" cellpadding="0">
345
 
<tr>
346
 
<td width="20px"></td><td><code><span class="label">value</span>:Date</code> &mdash;  the input Date value
347
 
   </td>
348
 
</tr>
349
 
</table>
350
 
<p></p>
351
 
<span class="label">Returns</span>
352
 
<table border="0" cellspacing="0" cellpadding="0">
353
 
<tr>
354
 
<td width="20"></td><td><code>Number</code> &mdash;   the calculated hours value
355
 
   </td>
356
 
</tr>
357
 
</table>
358
 
</div>
359
 
<a name="getMonthName()"></a>
360
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
361
 
<tr>
362
 
<td class="detailHeaderName">getMonthName</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
363
 
</tr>
364
 
</table>
365
 
<div class="detailBody">
366
 
<code>public static function getMonthName(index:int):String</code><p>
367
 
   Gets the English name of the month specified by index. This is the month value
368
 
   as stored in a Date object.
369
 
   
370
 
   </p><span class="label">Parameters</span>
371
 
<table border="0" cellspacing="0" cellpadding="0">
372
 
<tr>
373
 
<td width="20px"></td><td><code><span class="label">index</span>:int</code> &mdash; index the numeric value of the month
374
 
   </td>
375
 
</tr>
376
 
</table>
377
 
<p></p>
378
 
<span class="label">Returns</span>
379
 
<table border="0" cellspacing="0" cellpadding="0">
380
 
<tr>
381
 
<td width="20"></td><td><code>String</code> &mdash;  the string name of the month in English
382
 
   </td>
383
 
</tr>
384
 
</table>
385
 
</div>
386
 
<a name="getShortMonthName()"></a>
387
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
388
 
<tr>
389
 
<td class="detailHeaderName">getShortMonthName</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
390
 
</tr>
391
 
</table>
392
 
<div class="detailBody">
393
 
<code>public static function getShortMonthName(index:int):String</code><p>
394
 
   Gets the abbreviated month name specified by index. This is the month value
395
 
   as stored in a Date object.
396
 
   
397
 
   </p><span class="label">Parameters</span>
398
 
<table border="0" cellspacing="0" cellpadding="0">
399
 
<tr>
400
 
<td width="20px"></td><td><code><span class="label">index</span>:int</code> &mdash; index the numeric value of the month
401
 
   </td>
402
 
</tr>
403
 
</table>
404
 
<p></p>
405
 
<span class="label">Returns</span>
406
 
<table border="0" cellspacing="0" cellpadding="0">
407
 
<tr>
408
 
<td width="20"></td><td><code>String</code> &mdash;  the short string name of the month in English
409
 
   </td>
410
 
</tr>
411
 
</table>
412
 
</div>
413
 
<a name="isLeapYear()"></a>
414
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
415
 
<tr>
416
 
<td class="detailHeaderName">isLeapYear</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
417
 
</tr>
418
 
</table>
419
 
<div class="detailBody">
420
 
<code>public static function isLeapYear(year:int):Boolean</code><p>
421
 
   Determines if the input year is a leap year (with 366 days, rather than 365).
422
 
   
423
 
   </p><span class="label">Parameters</span>
424
 
<table border="0" cellspacing="0" cellpadding="0">
425
 
<tr>
426
 
<td width="20px"></td><td><code><span class="label">year</span>:int</code> &mdash; year the year value as stored in a Date object.
427
 
   </td>
428
 
</tr>
429
 
</table>
430
 
<p></p>
431
 
<span class="label">Returns</span>
432
 
<table border="0" cellspacing="0" cellpadding="0">
433
 
<tr>
434
 
<td width="20"></td><td><code>Boolean</code> &mdash;  true if the year input is a leap year
435
 
   </td>
436
 
</tr>
437
 
</table>
438
 
</div>
439
 
<a name="roundDown()"></a>
440
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
441
 
<tr>
442
 
<td class="detailHeaderName">roundDown</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
443
 
</tr>
444
 
</table>
445
 
<div class="detailBody">
446
 
<code>public static function roundDown(dateToRound:Date, timeUnit:String = "day"):Date</code><p>
447
 
   Rounds a Date value down to the nearest value on the specified time unit.
448
 
   
449
 
   </p><span class="label">Parameters</span>
450
 
<table border="0" cellspacing="0" cellpadding="0">
451
 
<tr>
452
 
<td width="20px"></td><td><code><span class="label">dateToRound</span>:Date</code></td>
453
 
</tr>
454
 
<tr>
455
 
<td class="paramSpacer">&nbsp;</td>
456
 
</tr>
457
 
<tr>
458
 
<td width="20px"></td><td><code><span class="label">timeUnit</span>:String</code> (default = "<code>day</code>")<code></code></td>
459
 
</tr>
460
 
</table>
461
 
<p></p>
462
 
<span class="label">Returns</span>
463
 
<table border="0" cellspacing="0" cellpadding="0">
464
 
<tr>
465
 
<td width="20"></td><td><code>Date</code></td>
466
 
</tr>
467
 
</table>
468
 
<p>
469
 
<span class="label">See also</span>
470
 
</p>
471
 
<div class="seeAlso">
472
 
<a href="../utils/TimeUnit.html" target="">com.yahoo.astra.utils.TimeUnit</a>
473
 
</div>
474
 
</div>
475
 
<a name="roundUp()"></a>
476
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
477
 
<tr>
478
 
<td class="detailHeaderName">roundUp</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
479
 
</tr>
480
 
</table>
481
 
<div class="detailBody">
482
 
<code>public static function roundUp(dateToRound:Date, timeUnit:String = "day"):Date</code><p>
483
 
   Rounds a Date value up to the nearest value on the specified time unit.
484
 
   
485
 
   </p><span class="label">Parameters</span>
486
 
<table border="0" cellspacing="0" cellpadding="0">
487
 
<tr>
488
 
<td width="20px"></td><td><code><span class="label">dateToRound</span>:Date</code></td>
489
 
</tr>
490
 
<tr>
491
 
<td class="paramSpacer">&nbsp;</td>
492
 
</tr>
493
 
<tr>
494
 
<td width="20px"></td><td><code><span class="label">timeUnit</span>:String</code> (default = "<code>day</code>")<code></code></td>
495
 
</tr>
496
 
</table>
497
 
<p></p>
498
 
<span class="label">Returns</span>
499
 
<table border="0" cellspacing="0" cellpadding="0">
500
 
<tr>
501
 
<td width="20"></td><td><code>Date</code></td>
502
 
</tr>
503
 
</table>
504
 
<p>
505
 
<span class="label">See also</span>
506
 
</p>
507
 
<div class="seeAlso">
508
 
<a href="../utils/TimeUnit.html" target="">com.yahoo.astra.utils.TimeUnit</a>
509
 
</div>
510
 
</div>
511
 
<a name="timeCodeToUTC()"></a>
512
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
513
 
<tr>
514
 
<td class="detailHeaderName">timeCodeToUTC</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
515
 
</tr>
516
 
</table>
517
 
<div class="detailBody">
518
 
<code>public static function timeCodeToUTC(timecode:String):String</code><p>
519
 
   Converts a time code to UTC.
520
 
   
521
 
   </p><span class="label">Parameters</span>
522
 
<table border="0" cellspacing="0" cellpadding="0">
523
 
<tr>
524
 
<td width="20px"></td><td><code><span class="label">timecode</span>:String</code> &mdash; the input timecode
525
 
   </td>
526
 
</tr>
527
 
</table>
528
 
<p></p>
529
 
<span class="label">Returns</span>
530
 
<table border="0" cellspacing="0" cellpadding="0">
531
 
<tr>
532
 
<td width="20"></td><td><code>String</code> &mdash;   the UTC value
533
 
   </td>
534
 
</tr>
535
 
</table>
536
 
</div>
537
 
<a name="constantDetail"></a>
538
 
<div class="detailSectionHeader">Constant detail</div>
539
 
<a name="DAYS_IN_APRIL"></a>
540
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
541
 
<tr>
542
 
<td class="detailHeaderName">DAYS_IN_APRIL</td><td class="detailHeaderType">constant</td>
543
 
</tr>
544
 
</table>
545
 
<div class="detailBody">
546
 
<code>public static const DAYS_IN_APRIL:int = 30</code><p>
547
 
   The number of days in April.
548
 
   </p></div>
549
 
<a name="DAYS_IN_AUGUST"></a>
550
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
551
 
<tr>
552
 
<td class="detailHeaderName">DAYS_IN_AUGUST</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
553
 
</tr>
554
 
</table>
555
 
<div class="detailBody">
556
 
<code>public static const DAYS_IN_AUGUST:int = 31</code><p>
557
 
   The number of days in August.
558
 
   </p></div>
559
 
<a name="DAYS_IN_DECEMBER"></a>
560
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
561
 
<tr>
562
 
<td class="detailHeaderName">DAYS_IN_DECEMBER</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
563
 
</tr>
564
 
</table>
565
 
<div class="detailBody">
566
 
<code>public static const DAYS_IN_DECEMBER:int = 31</code><p>
567
 
   The number of days in December.
568
 
   </p></div>
569
 
<a name="DAYS_IN_FEBRUARY"></a>
570
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
571
 
<tr>
572
 
<td class="detailHeaderName">DAYS_IN_FEBRUARY</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
573
 
</tr>
574
 
</table>
575
 
<div class="detailBody">
576
 
<code>public static const DAYS_IN_FEBRUARY:int = 28</code><p>
577
 
   The number of days in February on a standard year.
578
 
   </p></div>
579
 
<a name="DAYS_IN_FEBRUARY_LEAP_YEAR"></a>
580
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
581
 
<tr>
582
 
<td class="detailHeaderName">DAYS_IN_FEBRUARY_LEAP_YEAR</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
583
 
</tr>
584
 
</table>
585
 
<div class="detailBody">
586
 
<code>public static const DAYS_IN_FEBRUARY_LEAP_YEAR:int = 29</code><p>
587
 
   The number of days in February on a leap year.
588
 
   </p></div>
589
 
<a name="DAYS_IN_JANUARY"></a>
590
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
591
 
<tr>
592
 
<td class="detailHeaderName">DAYS_IN_JANUARY</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
593
 
</tr>
594
 
</table>
595
 
<div class="detailBody">
596
 
<code>public static const DAYS_IN_JANUARY:int = 31</code><p>
597
 
   The number of days in January.
598
 
   </p></div>
599
 
<a name="DAYS_IN_JULY"></a>
600
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
601
 
<tr>
602
 
<td class="detailHeaderName">DAYS_IN_JULY</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
603
 
</tr>
604
 
</table>
605
 
<div class="detailBody">
606
 
<code>public static const DAYS_IN_JULY:int = 31</code><p>
607
 
   The number of days in July.
608
 
   </p></div>
609
 
<a name="DAYS_IN_JUNE"></a>
610
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
611
 
<tr>
612
 
<td class="detailHeaderName">DAYS_IN_JUNE</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
613
 
</tr>
614
 
</table>
615
 
<div class="detailBody">
616
 
<code>public static const DAYS_IN_JUNE:int = 30</code><p>
617
 
   The number of days in June.
618
 
   </p></div>
619
 
<a name="DAYS_IN_LEAP_YEAR"></a>
620
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
621
 
<tr>
622
 
<td class="detailHeaderName">DAYS_IN_LEAP_YEAR</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
623
 
</tr>
624
 
</table>
625
 
<div class="detailBody">
626
 
<code>public static const DAYS_IN_LEAP_YEAR:int = 366</code><p>
627
 
   The number of days in a leap year.
628
 
   </p></div>
629
 
<a name="DAYS_IN_MARCH"></a>
630
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
631
 
<tr>
632
 
<td class="detailHeaderName">DAYS_IN_MARCH</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
633
 
</tr>
634
 
</table>
635
 
<div class="detailBody">
636
 
<code>public static const DAYS_IN_MARCH:int = 31</code><p>
637
 
   The number of days in March.
638
 
   </p></div>
639
 
<a name="DAYS_IN_MAY"></a>
640
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
641
 
<tr>
642
 
<td class="detailHeaderName">DAYS_IN_MAY</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
643
 
</tr>
644
 
</table>
645
 
<div class="detailBody">
646
 
<code>public static const DAYS_IN_MAY:int = 31</code><p>
647
 
   The number of days in May.
648
 
   </p></div>
649
 
<a name="DAYS_IN_NOVEMBER"></a>
650
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
651
 
<tr>
652
 
<td class="detailHeaderName">DAYS_IN_NOVEMBER</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
653
 
</tr>
654
 
</table>
655
 
<div class="detailBody">
656
 
<code>public static const DAYS_IN_NOVEMBER:int = 30</code><p>
657
 
   The number of days in November.
658
 
   </p></div>
659
 
<a name="DAYS_IN_OCTOBER"></a>
660
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
661
 
<tr>
662
 
<td class="detailHeaderName">DAYS_IN_OCTOBER</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
663
 
</tr>
664
 
</table>
665
 
<div class="detailBody">
666
 
<code>public static const DAYS_IN_OCTOBER:int = 31</code><p>
667
 
   The number of days in October.
668
 
   </p></div>
669
 
<a name="DAYS_IN_SEPTEMBER"></a>
670
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
671
 
<tr>
672
 
<td class="detailHeaderName">DAYS_IN_SEPTEMBER</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
673
 
</tr>
674
 
</table>
675
 
<div class="detailBody">
676
 
<code>public static const DAYS_IN_SEPTEMBER:int = 30</code><p>
677
 
   The number of days in September.
678
 
   </p></div>
679
 
<a name="DAYS_IN_YEAR"></a>
680
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
681
 
<tr>
682
 
<td class="detailHeaderName">DAYS_IN_YEAR</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
683
 
</tr>
684
 
</table>
685
 
<div class="detailBody">
686
 
<code>public static const DAYS_IN_YEAR:int = 365</code><p>
687
 
   The number of days in a standard year.
688
 
   </p></div>
689
 
<br>
690
 
<br>
691
 
<hr>
692
 
<br>
693
 
<p></p>
694
 
<center class="copyright"> 
695
 
</center>
696
 
</div>
697
 
</body>
698
 
</html>
699
 
<!-- -->