diff options
Diffstat (limited to 'files/ar/web/javascript/reference/global_objects/date/utc/index.html')
| -rw-r--r-- | files/ar/web/javascript/reference/global_objects/date/utc/index.html | 133 |
1 files changed, 0 insertions, 133 deletions
diff --git a/files/ar/web/javascript/reference/global_objects/date/utc/index.html b/files/ar/web/javascript/reference/global_objects/date/utc/index.html deleted file mode 100644 index 2d1400af0e..0000000000 --- a/files/ar/web/javascript/reference/global_objects/date/utc/index.html +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: Date.UTC() -slug: Web/JavaScript/Reference/Global_Objects/Date/UTC -tags: - - تاريخ - - جافاسكربت - - طريقة - - مرجع -translation_of: Web/JavaScript/Reference/Global_Objects/Date/UTC ---- -<div>{{JSRef}}</div> - -<p>دالة <strong><code>Date.UTC()</code></strong> تقبل نفس المُعاملات parameters علي الرغم من طول تكوين المنشيء، ويٌعيد التاريخ إلي المللي ثانية من بداية تاريخ 1 يناير, 1970, 00:00:00, التوقيت العالمي.</p> - -<div>{{EmbedInteractiveExample("pages/js/date-utc.html")}}</div> - - - -<h2 id="بنية_الجملة">بنية الجملة</h2> - -<pre class="syntaxbox">Date.UTC(<var>year</var>, <var>month</var>[, <var>day</var>[, <var>hour</var>[, <var>minute</var>[, <var>second</var>[, <var>millisecond</var>]]]]])</pre> - -<h3 id="المعاملات_(Parameters)">المعاملات (Parameters)</h3> - -<dl> - <dt><code>year</code></dt> - <dd>سنة كاملة.</dd> - <dt><code>month</code></dt> - <dd>رقم صحيح ما بين 0 و11 يمثل الشهر.</dd> - <dt><code>day</code></dt> - <dd>اختياري. رقم صحيح ما بين 1 و31 يمثل يوم من الشهر.</dd> - <dt><code>hour</code></dt> - <dd>اختياري. رقم صحيح ما بين 0 و23 يمثل الساعات.</dd> - <dt><code>minute</code></dt> - <dd>اختياري. رقم صحيح ما بين 0 و59 يمثل الدقائق.</dd> - <dt><code>second</code></dt> - <dd>اختياري. رقم صحيح ما بين 0 و59 يمثل الثواني.</dd> - <dt><code>millisecond</code></dt> - <dd>اختياري. رقم صحيح ما بين 0 و999 يمثل الميلي ثانية.</dd> -</dl> - -<h3 id="القيمة_العائدة">القيمة العائدة</h3> - -<p>رقم يمثل عدد المللي ثانية في التاريخ المحدد منذ 1 يناير, 1970, 00:00:00، التوقيت العالمي.</p> - -<h2 id="الوصف">الوصف</h2> - -<p>تقوم دالة <code>UTC()</code> بأخذ معاملات (parameters) التاريخ المحددة بفاصلة ثم تُعيدها إلي مللي ثانية بين 1 يناير 1970، 00:00:00 التوقيت العالمي، والوقت الذي حددته.</p> - -<p>يجب عليك تحديد <code>السنة</code> كاملة؛ علي سبيل المثال, 1998. إذا كانت السنة محددة ما بين عام 0 و99، تقوم هذه الطريقة بتحويل السنه إلي سنه في القرن العشرين <code>(1900 + سنة)</code>؛ علي سبيل المثال، إذا حددت 95، فسيتم أستخدام 1995.</p> - -<p>تختلف طريقة <code>UTC()</code> عن منشيء التاريخ بطريقتين.</p> - -<ul> - <li>تستخدم دالة <code>Date.UTC()</code> التوقيت العالمي بدلاً من التوقيت المحلي.</li> - <li>تقوم دالة <code>Date.UTC()</code> بإرجاع قمية الوقت إلي رقم بدلاً من إنشاء تاريخ.</li> -</ul> - -<p>If a parameter you specify is outside of the expected range, the <code>UTC()</code> method updates the other parameters to allow for your number. For example, if you use 15 for month, the year will be incremented by 1 <code>(year + 1)</code>, and 3 will be used for the month.</p> - -<p>Because <code>UTC()</code> is a static method of {{jsxref("Date")}}, you always use it as <code>Date.UTC()</code>, rather than as a method of a {{jsxref("Date")}} object you created.</p> - -<h2 id="أمثلة">أمثلة</h2> - -<h3 id="استخدام_Date.UTC()">استخدام <code>Date.UTC()</code></h3> - -<p>في المثال التالي يقوم بإنشاء التاريخ بإستخدام UTC بدلاً من التوقيت المحلي:</p> - -<pre class="brush:js">var utcDate = new Date(Date.UTC(2018, 11, 1, 0, 0, 0)); -</pre> - -<h2 id="الخصائص">الخصائص</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-date.utc', 'Date.UTC')}}</td> - <td>{{Spec2('ESDraft')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-date.utc', 'Date.UTC')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.9.4.3', 'Date.UTC')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES1')}}</td> - <td>{{Spec2('ES1')}}</td> - <td>Initial definition. Implemented in JavaScript 1.0.</td> - </tr> - </tbody> -</table> - -<h2 id="دعم_المتصفحات">دعم المتصفحات</h2> - -<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> - -<p>{{Compat("javascript.builtins.Date.UTC")}}</p> - -<h2 id="ملاحظات_التوافق">ملاحظات التوافق</h2> - -<h3 id="Date.UTC_with_fewer_than_two_arguments"><code>Date.UTC</code> with fewer than two arguments</h3> - -<p>When providing less than two arguments to <code>Date.UTC</code>, {{jsxref("NaN")}} is returned. This behavior is specified in ECMAScript 2017. Engines who weren't supporting this behavior, have been updated (see {{bug(1050755)}}, <a href="https://github.com/tc39/ecma262/pull/642">ecma-262 #642</a>).</p> - -<pre class="brush: js">Date.UTC(); -Date.UTC(1); - -// Safari: NaN -// Chrome/Opera/V8: NaN - -// Firefox <54: non-NaN -// Firefox 54+: NaN - -// IE: non-NaN -// Edge: NaN -</pre> - -<h2 id="اقرأ_أيضاً">اقرأ أيضاً</h2> - -<ul> - <li>{{jsxref("Date.parse()")}}</li> -</ul> |
