Start here:
http://www.w3schools.com/jsref/jsref_obj_date.asp

Convert the 1st month to a digit such as Feb = 2
Convert the 2nd month to a digit such as Mar = 3

Create a date variable for the 1st month as: var d1 = new Date(year, MM1,
day, hours, minutes, seconds, milliseconds);
 Create a date variable for the 2nd month as: var d2 = new Date(year, MM2,
day, hours, minutes, seconds, milliseconds);
Use zero or null for the non-used fields.

Use one of the date functions to convert the date (probably to its UTC
value) do the math and then convert back.

On Wed, Feb 2, 2011 at 2:53 AM, Pranki <pradeep.ankire...@gmail.com> wrote:

> Hi,
>
> I have a requirement , where in I have two combo boxes in my html file
> having dates in the format of MMM YYYY
> Eg: FEB 2011.
>
> Now i want to find out the difference between these two combo box
> dates in terms of months. I have to validate the form that the
> difference in between these two combo boxes should not be more than 12
> months.
>
> Combo 1 = Feb 2010,
> Combo 2 = Mar 2011.
>
> Diff is 13 months. So i need show a message to USER.
>
> Can anyone help me as I am new to Prototype JS.
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to
> prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to