-
Notifications
You must be signed in to change notification settings - Fork 7
/
getUTCSeconds-Method__Date.html
executable file
·23 lines (20 loc) · 15.1 KB
/
getUTCSeconds-Method__Date.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" encoding="utf-8"?><html xmlns:xsl="urn:schemas-microsoft-com:xslt" xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ms-help="http://msdn.microsoft.com/mshelp" xmlns:t="http://www.microsoft.com/topic/t" xmlns:msie="http://www.microsoft.com/ie/msie" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:tool="http://www.microsoft.com/tooltip" xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:o="urn:schemas-microsoft-com:office:dvraddata" xmlns:u1="http://www.microsoft.com/vs/dvvwdcon" xmlns:anim="http://www.microsoft.com/windowssdk/anim" xmlns:w="http://www.microsoft.com/windows/w" xmlns:v="http://www.microsoft.com/windows/v" xmlns:msxsl="http://www.microsoft.com/aspnet/cpguide" xmlns:st1="http://www.microsoft.com/webservices/mscomwssdkproject" xmlns:ds="http://www.microsoft.com/xml/xmlsdk/ds" xmlns:xsd="http://www.microsoft.com/xml/xmlsdk/xsd" xmlns:xdr="http://www.microsoft.com/xml/xmlsdk/xdr" xmlns:sql="http://www.microsoft.com/sql/xmlsql" xmlns:ph="http://www.microsoft.com/ph/placeholder" xmlns:xlink="http://www.w3.org/1999/xlink"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="save" content="history" /><title>getUTCSeconds Method (Date) (JavaScript)</title><meta name="Language" content="en-us" /><meta name="System.Keywords" content="getUTCSeconds method" /><meta name="System.Keywords" content="seconds method" /><meta name="System.Keywords" content="UTC times, returning" /><meta name="Microsoft.Help.F1" content="getUTCSeconds" /><meta name="Microsoft.Help.Id" content="2d8ea7dc-79f8-4a9b-b2ab-732db2bcd5fd" /><meta name="Description" content="Gets the seconds of a Date object using Universal Coordinated Time (UTC)." /><meta name="Microsoft.Help.ContentType" content="Reference" /><meta name="Refinement.TopicID" content="196" /><meta name="DCSext.ProductFamily" content="LIB_DG" /><meta name="DCSext.Product" content="VS_JScript" /><meta name="DCSext.Title" content="getUTCSeconds Method (Date) (JavaScript)" /><link rel="stylesheet" type="text/css" href="../styles/presentation.css" /><link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css" /><script type="text/javascript" src="../scripts/EventUtilities.js"><![CDATA[ ]]></script><script type="text/javascript" src="../scripts/SplitScreen.js"><![CDATA[ ]]></script><script type="text/javascript" src="../scripts/Dropdown.js"><![CDATA[ ]]></script><script type="text/javascript" src="../scripts/script_manifold.js"><![CDATA[ ]]></script><script type="text/javascript" src="../scripts/script_feedBack.js"><![CDATA[ ]]></script><script type="text/javascript" src="../scripts/CheckboxMenu.js"><![CDATA[ ]]></script><script type="text/javascript" src="../scripts/CommonUtilities.js"><![CDATA[ ]]></script><xml><mshelp:toctitle title="getUTCSeconds Method (Date)" /><mshelp:keyword index="A" term="2d8ea7dc-79f8-4a9b-b2ab-732db2bcd5fd" /><mshelp:keyword index="K" term="getUTCSeconds method" /><mshelp:keyword index="K" term="seconds method" /><mshelp:keyword index="K" term="UTC times, returning" /><mshelp:keyword index="F" term="getUTCSeconds" /><mshelp:attr name="RevisionNumber" value="9" /><mshelp:attr name="AssetID" value="2d8ea7dc-79f8-4a9b-b2ab-732db2bcd5fd" /><mshelp:attr name="Abstract" value="Gets the seconds of a Date object using Universal Coordinated Time (UTC)." /><mshelp:attr name="TopicVersion" value="8.0.13105.10000" /><mshelp:attr name="Catalog Container" value="System_Default_Catalog" /><mshelp:attr name="Content Set Container" value="System_Default_Content_Set" /><mshelp:attr name="PreferredLib" value="/library/ie" /><mshelp:attr name="Search.Refinement.TopicID" value="196" /><mshelp:attr name="TopicType" value="kbSyntax" /><mshelp:attr name="Locale" value="en-us" /></xml></head><body><input type="hidden" id="userDataCache" class="userDataStyle" /><input type="hidden" id="hiddenScrollOffset" /><img id="collapseImage" style="display:none; height:0; width:0;" src="../icons/collapse_all.gif" alt="Collapse image" title="Collapse image" /><img id="expandImage" style="display:none; height:0; width:0;" src="../icons/expand_all.gif" alt="Expand Image" title="Expand Image" /><img id="collapseAllImage" style="display:none; height:0; width:0;" src="../icons/collapse_all.gif" /><img id="expandAllImage" style="display:none; height:0; width:0;" src="../icons/expand_all.gif" /><img id="dropDownImage" style="display:none; height:0; width:0;" src="../icons/dropdown.gif" /><img id="dropDownHoverImage" style="display:none; height:0; width:0;" src="../icons/dropdownHover.gif" /><img id="copyImage" style="display:none; height:0; width:0;" src="../icons/copycode.gif" alt="Copy image" title="Copy image" /><img id="copyHoverImage" style="display:none; height:0; width:0;" src="../icons/copycodeHighlight.gif" alt="CopyHover image" title="CopyHover image" /><div id="header"><table id="topTable" cellspacing="0" cellpadding="0"><tr><td><span onclick="ExpandCollapseAll(toggleAllImage)" style="cursor:default;" onkeypress="ExpandCollapseAll_CheckKey(toggleAllImage, event)" tabindex="0"><img id="toggleAllImage" class="toggleAll" src="../icons/collapse_all.gif" /> <label id="collapseAllLabel" for="toggleAllImage" style="display: none;">Collapse All</label><label id="expandAllLabel" for="toggleAllImage" style="display: none;">Expand All</label> </span><span>    </span><span id="devlangsDropdown" class="filter" tabindex="0"><img id="devlangsDropdownImage" src="../icons/dropdown.gif" /> <label id="devlangsMenuAllLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: All </nobr></label><label id="devlangsMenuMultipleLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: Multiple </nobr></label><label id="devlangsMenuVisualBasicLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: Visual Basic </nobr></label><label id="devlangsMenuCSharpLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: C# </nobr></label><label id="devlangsMenuManagedCPlusPlusLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: Visual C++ </nobr></label><label id="devlangsMenuFSharpLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: F# </nobr></label><label id="devlangsMenuHLSLLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: HLSL </nobr></label><label id="devlangsMenuJScriptLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: JScript </nobr></label></span></td></tr></table><div id="devlangsMenu"><input id="VisualBasicCheckbox" type="checkbox" data="VisualBasic,vb,'persist'" value="on" onclick="SetLanguage(this)" /><label class="checkboxLabel" for="VisualBasicCheckbox">Visual Basic</label><br /><input id="CSharpCheckbox" type="checkbox" data="CSharp,cs,'persist'" value="on" onclick="SetLanguage(this)" /><label class="checkboxLabel" for="CSharpCheckbox">C#</label><br /><input id="ManagedCPlusPlusCheckbox" type="checkbox" data="ManagedCPlusPlus,cpp,'persist'" value="on" onclick="SetLanguage(this)" /><label class="checkboxLabel" for="ManagedCPlusPlusCheckbox">Visual C++</label><br /><input id="FSharpCheckbox" type="checkbox" data="FSharp,fs,'persist'" value="on" onclick="SetLanguage(this)" /><label class="checkboxLabel" for="FSharpCheckbox">F#</label><br /><input id="HLSLCheckbox" type="checkbox" data="HLSL,cpp,'persist'" value="on" onclick="SetLanguage(this)" /><label class="checkboxLabel" for="HLSLCheckbox">HLSL</label><br /><input id="JScriptCheckbox" type="checkbox" data="JScript,cs,'persist'" value="on" onclick="SetLanguage(this)" /><label class="checkboxLabel" for="JScriptCheckbox">JScript</label><br /></div><table id="bottomTable" cellpadding="0" cellspacing="0"><tr id="headerTableRow1"><td align="left"><span id="runningHeaderText">JavaScript</span></td></tr><tr id="headerTableRow2"><td align="left"><span id="nsrTitle">getUTCSeconds Method (Date) (JavaScript)</span></td></tr><tr id="headerTableRow3"><td align="left"><a href="#exampleToggle" onclick="OpenSection(exampleToggle)">Example</a>  <a href="#seeAlsoToggle" onclick="OpenSection(seeAlsoToggle)">See Also</a> 
<span id="headfeedbackarea" class="feedbackhead">
<a href="javascript:SubmitFeedback('DevDocs@Microsoft.com','','','','8.0.13105.10000','%0\dThank%20you%20for%20your%20feedback.%20The%20developer%20writing%20teams%20use%20your%20feedback%20to%20improve%20documentation.%20While%20we%20are%20reviewing%20your%20feedback,%20we%20may%20send%20you%20e-mail%20to%20ask%20for%20clarification%20or%20feedback%20on%20a%20solution.%20We%20do%20not%20use%20your%20e-mail%20address%20for%20any%20other%20purpose%20and%20we%20delete%20it%20after%20we%20finish%20our%20review.%0\AFor%20further%20information%20about%20the%20privacy%20policies%20of%20Microsoft,%20please%20see%20http://privacy.microsoft.com/en-us/default.aspx.%0\A%0\d','Customer%20Feedback');">
Send Feedback
</a>
</span>
</td></tr></table><table id="gradientTable"><tr><td class="nsrBottom" background="../icons/gradient.gif" /></tr></table></div><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()" /><font color="DarkGray"><p /></font> <div class="introduction"><p xmlns:util="util">Gets the seconds of a <b>Date</b> object using Universal Coordinated Time (UTC).</p></div><div id="syntaxSection" class="section"><div id="syntaxCodeBlocks" class="code"><span codelanguage="other"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left" /></tr><tr><td><pre><span class="parameter" sdata="paramReference" xmlns:util="util">dateObj</span>.getUTCSeconds() </pre></td></tr></table></span></div></div><h1 class="heading"><span onclick="ExpandCollapse(parametersToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(parametersToggle, event)" tabindex="0"><img id="parametersToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Parameters</span></h1><div id="parametersSection" class="section" name="collapseableSection" style=""><p xmlns:util="util">The required <span class="parameter" sdata="paramReference">dateObj</span> reference is a <b>Date</b> object.</p></div><h1 class="heading"><span onclick="ExpandCollapse(returnValueToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(returnValueToggle, event)" tabindex="0"><img id="returnValueToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Return Value</span></h1><div id="returnValueSection" class="section" name="collapseableSection" style=""><p xmlns:util="util">Returns an integer between 0 and 59. Zero is returned when the time is less than one second into the current minute. If a <b>Date</b> object was created without specifying the time, by default the UTC seconds value is 0.</p></div><h1 class="heading"><span onclick="ExpandCollapse(languageReferenceRemarksToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(languageReferenceRemarksToggle, event)" tabindex="0"><img id="languageReferenceRemarksToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Remarks</span></h1><div id="languageReferenceRemarksSection" class="section" name="collapseableSection" style=""><p xmlns:util="util">To get the number of seconds in local time, use the <b>getSeconds</b> method.</p></div><h1 class="heading"><span onclick="ExpandCollapse(exampleToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(exampleToggle, event)" tabindex="0"><img id="exampleToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Example</span></h1><div id="exampleSection" class="section" name="collapseableSection" style=""><p xmlns:util="util">The following example shows how to use the <b>getUTCSeconds</b> method. </p><div class="code"><span codelanguage="JavaScript"><table width="100%" cellspacing="0" cellpadding="0"><tr><th>JavaScript </th><th><span class="copyCode" onclick="CopyCode(this)" onkeypress="CopyCode_CheckKey(this, event)" onmouseover="ChangeCopyCodeIcon(this)" onmouseout="ChangeCopyCodeIcon(this)" tabindex="0"><img class="copyCodeImage" name="ccImage" align="absmiddle" alt="Copy image" title="Copy image" src="../icons/copycode.gif" />Copy Code</span></th></tr><tr><td colspan="2"><pre>var date = new Date("1/1/2001");
document.write(date. getUTCSeconds());
// Output: 0
</pre></td></tr></table></span></div></div><h1 class="heading"><span onclick="ExpandCollapse(requirementsTitleToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(requirementsTitleToggle, event)" tabindex="0"><img id="requirementsTitleToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Requirements</span></h1><div id="requirementsTitleSection" class="section" name="collapseableSection" style=""><p xmlns:util="util">
</p><p>Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards. Also supported in Windows Store apps. See <mshelp:link keywords="440f4924-f7a9-48e0-873e-bd599a93b437" tabindex="0">Version Information</mshelp:link>. </p>
<p xmlns:util="util"><b>Applies To</b>: <span sdata="link"><a href="ce2202bb-7ec9-4f5a-bf48-3a04feff283e.htm">Date Object (JavaScript)</a></span></p></div><h1 class="heading"><span onclick="ExpandCollapse(seeAlsoToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(seeAlsoToggle, event)" tabindex="0"><img id="seeAlsoToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />See Also</span></h1><div id="seeAlsoSection" class="section" name="collapseableSection" style=""><h4 class="subHeading">Other Resources</h4><div class="seeAlsoStyle"><span sdata="link" xmlns:util="util"><a href="97b10674-af0b-4681-a846-38f972196501.htm">getSeconds Method (Date) (JavaScript)</a></span></div><div class="seeAlsoStyle"><span sdata="link" xmlns:util="util"><a href="986ffa54-1db6-4af2-ab8b-8353f64f0b57.htm">setSeconds Method (Date) (JavaScript)</a></span></div><div class="seeAlsoStyle"><span sdata="link" xmlns:util="util"><a href="e035e282-b39d-4d1d-8771-c17542fd6493.htm">setUTCSeconds Method (Date) (JavaScript)</a></span></div></div></div><div id="footer"><div class="footerLine"><img width="100%" height="3px" src="../icons/footer.gif" alt="Footer image" title="Footer image" /></div>
<span id="feedbackarea">
Send
<a href="javascript:SubmitFeedback('DevDocs@Microsoft.com','','','','8.0.13105.10000','%0\dThank%20you%20for%20your%20feedback.%20The%20developer%20writing%20teams%20use%20your%20feedback%20to%20improve%20documentation.%20While%20we%20are%20reviewing%20your%20feedback,%20we%20may%20send%20you%20e-mail%20to%20ask%20for%20clarification%20or%20feedback%20on%20a%20solution.%20We%20do%20not%20use%20your%20e-mail%20address%20for%20any%20other%20purpose%20and%20we%20delete%20it%20after%20we%20finish%20our%20review.%0\AFor%20further%20information%20about%20the%20privacy%20policies%20of%20Microsoft,%20please%20see%20http://privacy.microsoft.com/en-us/default.aspx.%0\A%0\d','Customer%20Feedback');">
feedback
</a>
on this topic to Microsoft.
</span>
</div></div></body></html>