www.icetips.com  Icetips Utilities Documentation 7/6/2012    

Date Class: GetDayName

Previous  Top  Next  


Prototype: (Byte pDay, Byte pLongName=True),String

 

pDayDay of the week, starting with 1 for Sunday
pLongNameDetermine if it should return the long/full day name.  This parameter is true by default.

 

ReturnsThe day name as it has been specified by the Constructor or by updating the day names by SetDayName

 

This method is used to retrieve the day name, such as "Sunday" based on a day number, 0 for Sunday, 1 for Monday and so on.  The Constructor calls the InitDayNames which sets the English day names, both long and short (3 character abbreviated day names, Sun, Mon, etc.)  Day name constants are declared in the ITEquates.inc file to make day selections easy, IT_Sunday, IT_Monday, IT_Tuesday, IT_Wednesday, IT_Thursday, IT_Friday, IT_Saturday.

 

Example:

ITD  ITDateClass

TheDate  Date

Code

TheDate = Date(1,1,2012)

ITD.GetDayName(TheDate % 7, True)  !! Get the day name for Jan 1, 2012, which should return "Sunday"

Message('January 1, 2012 was a: ' & ITD.GetDayName(TheDate % 7)) 

 

 

See also:

SetDayName

InitDayNames

Construct

 



Direct link to this page: http://www.icetips.com/manuals/utilities/getdayname_dateclass.htm