الفرق بين المراجعتين ل"Ruby/Time/isdst"

من موسوعة حسوب
< Ruby‏ | Time
اذهب إلى التنقل اذهب إلى البحث
ط (مراجعة وتدقيق.)
 
سطر 1: سطر 1:
<noinclude>{{DISPLAYTITLE: التابع <code>isdst‎</code> الخاص بالصنف <code>Time</code> في روبي}}</noinclude>
+
<noinclude>{{DISPLAYTITLE: التابع <code>Time.isdst‎</code> في روبي}}</noinclude>
 
[[تصنيف: Ruby]]
 
[[تصنيف: Ruby]]
 
[[تصنيف: Ruby Method]]
 
[[تصنيف: Ruby Method]]
 
[[تصنيف: Ruby Time]]
 
[[تصنيف: Ruby Time]]
يُعيد التابع <code>isdst</code> القيمة <code>true</code> إن وقع [[Ruby/Time|التوقيت]] الذي استُدعي معه أثناء التوقيت الصيفي<code>[[Ruby/Time|Time]]</code> في منطقته الزمنية.
+
يتحقق التابع <code>isdst</code> إن وقع [[Ruby/Time|التوقيت]] الذي استُدعي معه أثناء التوقيت الصيفي في منطقته الزمنية.
 
==البنية العامة==
 
==البنية العامة==
 
<syntaxhighlight lang="ruby">isdst → true or false‎</syntaxhighlight>
 
<syntaxhighlight lang="ruby">isdst → true or false‎</syntaxhighlight>
==القيمة المُعادة==
+
==القيمة المعادة==
يُعيد التابع <code>isdst</code> القيمة <code>true</code> إن وقع [[Ruby/Time|التوقيت]] الذي استُدعي معه أثناء التوقيت الصيفي<code>[[Ruby/Time|Time]]</code> في منطقته الزمنية. خلا ذلك سيعيد <code>flase</code>.
+
تعاد القيمة <code>true</code> إن وقع [[Ruby/Time|التوقيت]] المعطى أثناء التوقيت الصيفي في منطقته الزمنية. خلا ذلك، تعاد القيمة <code>flase</code>.
  
 
==أمثلة==
 
==أمثلة==
سطر 25: سطر 25:
 
   Time.local(2000, 7, 1).isdst  #=> false
 
   Time.local(2000, 7, 1).isdst  #=> false
 
   Time.local(2000, 7, 1).dst?    #=> false‎</syntaxhighlight>
 
   Time.local(2000, 7, 1).dst?    #=> false‎</syntaxhighlight>
==انظر أيضا==
+
==انظر أيضًا==
* التابع <code>[[Ruby/Time/inspect|inspect]]</code>: يُعيد التابع <code>inspect</code> [[Ruby/String|سلسلة نصية]] تمثل [[Ruby/Time|التوقيت]].
+
* التابع <code>[[Ruby/Time/inspect|inspect]]</code>: يُعيد [[Ruby/String|سلسلة نصية]] تمثل [[Ruby/Time|التوقيت]] الذي استدعي معه.
* التابع <code>[[Ruby/Time/localtime|localtime]]</code>: يحول التابع <code>localtime</code> [[Ruby/Time|التوقيت]] <code>time</code> إلى التوقيت المحلي.
+
* التابع <code>[[Ruby/Time/localtime|localtime]]</code>: يحول [[Ruby/Time|التوقيت]] الذي استدعي معه إلى التوقيت المحلي.
 
==مصادر==
 
==مصادر==
*[http://ruby-doc.org/core-2.5.1/Time.html#method-i-isdst قسم التابع isdst‎ في الصنف Time‎ في توثيق روبي الرسمي.]
+
*[http://ruby-doc.org/core-2.5.1/Time.html#method-i-isdst قسم التابع isdst‎ في الصنف Time‎ في توثيق روبي الرسمي.]

المراجعة الحالية بتاريخ 14:58، 7 ديسمبر 2018

يتحقق التابع isdst إن وقع التوقيت الذي استُدعي معه أثناء التوقيت الصيفي في منطقته الزمنية.

البنية العامة

isdst  true or false

القيمة المعادة

تعاد القيمة true إن وقع التوقيت المعطى أثناء التوقيت الصيفي في منطقته الزمنية. خلا ذلك، تعاد القيمة flase.

أمثلة

مثال على استخدام التابع isdst‎:

# CST6CDT:
  Time.local(2000, 1, 1).zone    #=> "CST"
  Time.local(2000, 1, 1).isdst   #=> false
  Time.local(2000, 1, 1).dst?    #=> false
  Time.local(2000, 7, 1).zone    #=> "CDT"
  Time.local(2000, 7, 1).isdst   #=> true
  Time.local(2000, 7, 1).dst?    #=> true
# Asia/Tokyo:
  Time.local(2000, 1, 1).zone    #=> "JST"
  Time.local(2000, 1, 1).isdst   #=> false
  Time.local(2000, 1, 1).dst?    #=> false
  Time.local(2000, 7, 1).zone    #=> "JST"
  Time.local(2000, 7, 1).isdst   #=> false
  Time.local(2000, 7, 1).dst?    #=> false‎

انظر أيضًا

مصادر