I was working on a project, and I needed to write a new function which calculates yesterday’s date and if yesterday was a Sunday, the function needed to return last Friday’s date. The first part of my function checks to see if the date supplied to the function is at least Tuesday. If the date passes that check, then we subtract one from the date and return the date.
If the date failed the first check, then we subtract 7 from the date to get a day last week, and then subtract the day of the week from that day in order to get to the beginning of the week. Finally we add 6 to that day in order to get Friday.
[cffunction name="getLastWorkDay" returntype="numeric" access="private"]
[cfargument required="true" type="date" name="DateToProcess"]
[cfif DayOfWeek(fix(arguments.DateToProcess)) GT 2 ]
[cfreturn CreateDate(Year(arguments.DateToProcess),Month(arguments.DateToProcess),Day(arguments.DateToProcess-1)) /]
[cfreturn DateFormat((Fix(arguments.DateToProcess)-7) - DayOfWeek(Fix(arguments.DateToProcess)-7)+6)/]
[cfoutput]Date: #DateFormat(getLastWorkDay(now()), "dddd, mmmm d, yyyy")#[/cfoutput]
How God Makes Men: Ten Epic Stories. Ten Proven Principles. One Huge Promise for Your Life.
“All through the Bible, we see stories of bold and brash men who followed God’s call into some incredible adventures. In How God Makes Men,Patrick Morley reminds us that God still makes those kinds of guys.” —Dave Ramsey, New York Times best-selling author and nationally syndicated radio show host
You can find the first chapter of this book online at Patrick Morley’s website.
In this example, I will be using an “Announcements List,” with the default fields, and using and Windows Form App, I will load data from this list into a DataGridView. You will need to download and install the SharePoint Server 2013 Client Components SDK from Microsoft.
After you have installed the SDK, You will need to add the following two references to your project: Continue Reading
Take a moment to remember all those who died in the attack and those who survived and when on to fight in the war.
November 8, 1941, New York, New York, USA — These headlines were from a New York newspaper telling of the start of the American-Japanese war, December 7, 1941. — Image by © Bettmann/CORBIS
Are you tried of hearing that there isn’t any archaeological evidence that supports the Biblical narrative of history? Check out this video where Dr. Patton shows some of the evidence.
This article is interesting and unsettling. The points Charlie Hoehn makes are:
- Men in the United States are chronically lonely.
They have no significant friendships to rely on, and very few quality people to confide in.
- Men in the United States are deprived of play opportunities.
Their innate ability was crippled, and they struggle to maintain a healthy emotional connection with themselves and others.
- They are deeply ashamed.
They experienced extreme ridicule, rejection, or humiliation.
I tend to agree with Charlies points. I would add that society is making it very difficult for men to get away as groups of men. I’ve been a part of a men’s group for a quite a few years now, and I can say there is something about being in a group of Godly men. What’s your thoughts on this?
Thoughts on Vegas, and Why Men Keep Doing This
I was 12 years old, sitting in art class in middle school. We were playing with clay and making sculptures. “I have an important announcement to make. All teachers and students need to hear this.