Q: How does the daily script calculate the number of days in a specified month?A: In this case ....
1: function daysInMonth(iMonth, iYear)
2: {
3: return 32 - new Date(iYear, iMonth, 32).getDate();
4: }
As for why, you may
All along, the most used is my97datepicker to get the month and day method, today suddenly wandered to this article, stay, for future use
Write one yourself: Get the year and start counting from next month
Original reproduced from:
DECLARE @ DateDATETIMESET @ DateGETDATE () -- previous DAY, previous DAY of given Date SELECTDATEADD (DAY,-1, @ Date) AS previous DAY -- next DAY, next DAY of given Date SELECTDATEADD (DAY, 1, @ Date) AS the next day GO -- the beginning of the month,
Words not much to say, directly on the code:
$BeginDate = "2015-05-31";//New Gets the last 1 days of the specified month echo date ("Y-m-t", Strtotime ("+1 months", Strtotime ($BeginDate)));
Based on experience, the results should be: 2015-06-30
WEB junior engineer (CSS, not considering JS for the moment) means that the project can be completed independently. At least the following capabilities should be available: 1. able to independently complete the project and restore the design draft
PrefaceI have nearly a decade of technical background, in addition to app development on the back end, the front end, etc. are familiar with, recently do an app project requires iOS, Android two platforms are required, can only bite the bullet. In
No nonsense.CodeThe comment is very detailed. It is certainly okay to understand it!
Declare @ date datetimeSet @ date = getdate ()-The previous day, the previous day of the given dateSelect dateadd (day,-1, @ date) as 'previous Day'-The next day,
During the recent year of career planning counseling, I clearly felt the urgency of the need for career planning for people over the age of 35. It is from these cases that we have a clear insight into how time-point mastery plays a decisive role in
Description
1. The drugs used in this report, mainly food, are absolutely non-toxic.
2. In order to make the reader easy to understand, the dose units are in old format, such as: Jin, two, money, and so on. Some use bowls, which refer to general
Description1. drugs used in this book, mainly food, are absolutely non-toxic.2. In order to make the reader easy to understand, the dose units are in old format, such as: Jin, two, money, and so on. Some use bowls, which refer to general medium
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.