Toggle menu
876
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

DateTime dayOfWeek: Difference between revisions

From Catglobe Wiki
jrfconvert import
 
Cg van (talk | contribs)
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:HelpBooks]]
{{HelpFiles}}



====DateTime_dayOfWeek====
<br>


Return day of week (Mon, Tue, Wed,...) of a datetime
==== DateTime_dayOfWeek ====


'''Syntax'''
Return day of week (Mon, Tue, Wed,...) of a datetime


DateTime_dayOfWeek(datetime);
'''Syntax'''


'''Arguments'''
DateTime_dayOfWeek(datetime);


* datetime: is array in which we get dayOfWeek
'''Arguments'''


'''Return value'''
*datetime: is array in which we get dayOfWeek


number in which:
'''Return value'''


* 0: DateTime_Sunday
number in which:  
* 1: DateTime_Monday
* 2: DateTime_Tuesday
* 3: DateTime_Wednesday
* 4: DateTime_Thursday
* 5: DateTime_Friday
* 6: DateTime_Saturday


'''Example'''
*0: DateTime_Sunday
*1: DateTime_Monday
*2: DateTime_Tuesday
*3: DateTime_Wednesday
*4: DateTime_Thursday
*5: DateTime_Friday
*6: DateTime_Saturday


array a1 = {2009,5,23,10,0,0,0,19,57};
'''Example'''


print(DateTime_dayOfWeek(a1));
''array a1 = {2009,5,23,10,0,0,0,19,57};''


// a1=6
''number d = DateTime_dayOfWeek(a1);''


'''Availability'''
''if (d == 0) print("Sunday");''


Version 5.7
''else if (d == 1) print("Monday");''
__NOTOC__
 
<!-- imported from file: 7528.htm-->
''else if (d == 2) print("Tuesday");''
 
''else if (d == 3) print("Wednesday");''
 
''else if (d == 4) print("Thursday");''
 
''else if (d == 5) print("Friday");''
 
''else if (d == 6) print("Saturday");''
 
''//Saturday''
 
'''Availability'''
 
Version 5.7 __NOTOC__ <!-- imported from file: 7528.htm-->  
 
[[Category:General_Functions]]

Latest revision as of 05:05, 21 December 2011




DateTime_dayOfWeek

Return day of week (Mon, Tue, Wed,...) of a datetime

Syntax

DateTime_dayOfWeek(datetime);

Arguments

  • datetime: is array in which we get dayOfWeek

Return value

number in which:

  • 0: DateTime_Sunday
  • 1: DateTime_Monday
  • 2: DateTime_Tuesday
  • 3: DateTime_Wednesday
  • 4: DateTime_Thursday
  • 5: DateTime_Friday
  • 6: DateTime_Saturday

Example

array a1 = {2009,5,23,10,0,0,0,19,57};

number d = DateTime_dayOfWeek(a1);

if (d == 0) print("Sunday");

else if (d == 1) print("Monday");

else if (d == 2) print("Tuesday");

else if (d == 3) print("Wednesday");

else if (d == 4) print("Thursday");

else if (d == 5) print("Friday");

else if (d == 6) print("Saturday");

//Saturday

Availability

Version 5.7