Wednesday, November 11, 2009 11:47 AM Yonggang Meng

Get the last day of the month use javascript in VS2008

I have a function which returns the last day of a month. The function is like this:

In Javascript Editor, it works like the above picture.

But in VS2008, it's strange.

I am very strange for this, then I Bing,

http://www.w3schools.com/jsref/jsref_parseInt.asp

See the fuction parseInt(string, radix)

String: the value you want to convert to number.

Rules:

If the string begins with "0x", the radix is 16 (hexadecimal)

If the string begins with "0", the radix is 8 (octal). This feature is deprecated

If the string begins with any other value, the radix is 10 (decimal)

Then, I change my codes

var month = parseInt(strs[1]);

to

var month = parseInt(strs[1],10);

It functions.

Javascript Editor seems not function well.

====================================================================

The JS codes have something wrong. I change it to this:

var strs = p_InputMonth.split("/");
var year = parseInt(strs[0]);
var month = parseInt(strs[1], 10);
var date = new Date(year,month, 0 ); 0: the last day of the month. (Month Index: 0...11)
var lastDay = date.getDate();

When i use new Date(2009,9,iDay) or Date.setDate(iDay) in Javascript Editor, if iDay is not in (1...31) , it will pop an error message "It's a not valid parameter."

but in IE, the js codes work well.

====================================================================

date.setFullYear(year, month+1,1);
date = new Date(date/86400000);
var lastDay =date.getDate();

In Javascript Editor, i must use "/", but in IE i should use "-"

====================================================================

Why Javascript Editor is different with IE? is it just because my JS Editor is free version???

Filed under: , , ,

Comments

# re: Get the last day of the month use javascript in VS2008

Saturday, February 19, 2011 3:40 AM by Whitny Kripke

It was rather interesting for me to read this blog. Thanx for it. I like such topics and everything connected to them. I would like to read a bit more on that site soon.    

Whitny  Kripke  

<a href="indianescortmodels.com/">Indian escorts services</a>

# re: Get the last day of the month use javascript in VS2008

Monday, February 28, 2011 9:50 PM by Jenny Flouee

It was certainly interesting for me to read that post. Thanks for it. I like such themes and everything that is connected to this matter. I would like to read a bit more on that site soon.    

Jenny  Flouee    

<a href="www.latinescortlondon.com/">London escorts latin</a>

# re: Get the last day of the month use javascript in VS2008

Saturday, March 05, 2011 12:08 PM by Natasha Trider

It is certainly interesting for me to read that blog. Thank author for it. I like such topics and anything connected to this matter. I would like to read a bit more soon.      

Natasha  Trider    

<a href="www.jammer-store.com/">cell phone signal scrambler</a>

# re: Get the last day of the month use javascript in VS2008

Friday, March 18, 2011 2:54 PM by Whitny Stepman

It is extremely interesting for me to read this article. Thanks for it. I like such topics and anything connected to this matter. I definitely want to read more soon.        

Whitny  Stepman      

<a href="rome-escort.info/">escorts in roma</a>

# re: Get the last day of the month use javascript in VS2008

Tuesday, April 12, 2011 4:51 AM by Jane Swingfield

It was rather interesting for me to read the post. Thanx for it. I like such themes and everything that is connected to this matter. I definitely want to read a bit more on this blog soon.          

Jane  Swingfield          

<a href="milanescorts.com/">escort in milan</a>

# re: Get the last day of the month use javascript in VS2008

Monday, March 05, 2012 11:14 PM by Jacob1279m

Provided that you lack some valuable information, thereforeobey my experience. I felt bothersome and depressed, but randomly I hit on this useful catalogue. I was aspiring for solutions to weighty questions and blossomed. news I got with <a href="cell-phonejammer.com/">cell phone jammers</a> helped me attaining certainty and self-regard. since that, I understand how to proceed and grasp my path.

# re: Get the last day of the month use javascript in VS2008

Tuesday, March 13, 2012 11:13 AM by Katelyn2454j

Actual market provides a vast range of produce. At some moment, you should settle on a producer to pick out. We believe all offers are identical. However, when you visit a stack, they propose an identical product representedin manifold alternatives. I would like to promote <a href="www.jammer-store.com/.../a> to all that opt for grade.

# re: Get the last day of the month use javascript in VS2008

Wednesday, October 31, 2012 1:59 PM by icon pack

 I consider, that you are not right. I am assured. I can defend the position. Write to me in PM, we will talk.

<a href="windows2012icons.com/.../16x16-gif-custom-icons-0c">16x16 gif custom icons</a>

# re: Get the last day of the month use javascript in VS2008

Sunday, November 04, 2012 9:37 AM by icon pack

<a href=avon.photomoscow.ru/.../index.php I apologise, but, in my opinion, you are mistaken. I can prove it. Write to me in PM, we will discuss.</a>

# re: Get the last day of the month use javascript in VS2008

Sunday, November 04, 2012 3:28 PM by icon design

<a href=miraculix.gforen.de/viewtopic.php I hope, you will find the correct decision. Do not despair.</a>

# re: Get the last day of the month use javascript in VS2008

Sunday, November 04, 2012 4:25 PM by icons set

[url=csposada.tk/showthread.php] Earlier I thought differently, thanks for an explanation.[/url]

# re: Get the last day of the month use javascript in VS2008

Monday, November 05, 2012 10:54 AM by icon set

[url=weblogs.asp.net/.../221750.aspx] Between us speaking, I would arrive differently.[/url]

# re: Get the last day of the month use javascript in VS2008

Thursday, December 13, 2012 9:36 AM by icons

P.S. Please review our <a href="http://discount.wp8design.com">design portfolio</a> for Doors2012.

Information Product Development: Four Types of Home Study Courses

When you teach a class live, students are gathered together either in a physical classroom or a virtual one, and a teacher lectures or leads the students in a discussion around a sequence of topics. Unless your course concerns a sensitive issue, where students need to feel comfortable to speak their minds only to those in the grouup, you're smart to record your sessions and turn them into a home study course. That way, you've multiplied your earnings from the preparation you've done.However, what type of home study course should you choose? There actually are numerous kinds.Four Types of Home Study Courses1. The semi-lvie course. When you taught a course previously and recorded it, the next time you teach it to a group, you can have the students listen to (or watch) one of the previous recordings prior to each class meeting. Then during your live sessions you can review the material, answer questions and assist participants in applying the content to their challenges. This is a hybrid of a live course and a home study course, using some canned material in conjunction with teacher-student interaction. Generally you'd run the semi-live course for the same number of weeks as for the previous live version and charge the same amount as for the live course.Advantages for participants: Plenty of time for support and feedback during the class sessions; the class schedule provides a structure for moving through the course that's missing with the other options belowAdvantages for you: Little preparation needed; a low-stress way to provide the benefits of a live course repeatedly; verg high perceived value2. Canned course with one-on-one feedback or coaching. Here you offer a course recorded on audio or video or via a step-by-step text manual. Besides consuming the lessons, your students can submit homework assignments to you for feedback or have their questions and concerns addressed via personal emails or telephone coaching calls. Many instructors report that most enrollees do not take full advantage of the feedback or coaching option.Advantages for participoants: Can be sure they're on track in mastering the material and applying it to their goalsAdvantages for you: High perceived value and the ability to charge much more for this kind of course than for types 3 or 4 below; small time commitment needed to supply the coaching or feedback promised3. Canned course with interactive exercises. Participants in this kind of course go through it on their own but also haave the opportunity to check their progress and mastery, through quizzes with answers provided or homework assignments that they can compare to typical or ideal answers.Advantages for participants: Opportunities to determine whether or not they're truly mastering the ideas and skills in the courseAdvantages for you: No time of yours needed beyond selling the course4. Canned course with no feedback or interaction. You provide the learning materials that buyers go through completely on their own. They need the greatest amount of self-discipline to complete this kind of course, and it lacks the engagement factor of types 1, 2 and 3 above.Advantages for participants: For some, a familiar, straighftorward learning opportunityAdvantages for you: Easiest to prepare; sell it and you're doneBased on my experiences teaching live courses and selling all the home study permutations above, I can tell you that the semi-live course generates by far the greatest level of customer satisfaction and the lowest refund ate. On the other hand, if you'd like to sell the most number of courses at the most reasonable price, the completely canned course wins, while offering students a reasonably good learning experience.

# re: Get the last day of the month use javascript in VS2008

Friday, January 11, 2013 12:15 PM by Lupo Barro

NRA arriving at White Residence: Will there be fireworks?

# re: Get the last day of the month use javascript in VS2008

Saturday, April 13, 2013 6:56 PM by Briscoe

Hello, I enjoy reading through your article post. I like to write a little comment to support you.

Leave a Comment

(required) 
(required) 
(optional)
(required)